bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

datepickerPopup wrong deprecation warning for unspecified minDate/maxDate

Open ndrsv opened this issue 10 years ago • 4 comments

When using datepickerPopup

  • without datepickerOptions; or
  • with datepickerOptions and minDate or maxDate undefined

wrong deprecation warnings are printed to the console on popup activation:

Literal date support has been deprecated, please switch to date object usage

http://plnkr.co/edit/ShuLcciyecNDfxlhOHHV?p=preview

Angular: 1.5.3 UIBS: 1.3.0 Bootstrap: 3.3.6

ndrsv avatar Apr 05 '16 09:04 ndrsv

I think this ticket could be closed as documented with the following pull request: https://github.com/angular-ui/bootstrap/pull/5732

evilaliv3 avatar Apr 05 '16 12:04 evilaliv3

@evilaliv3

Either the updated documentation is wrong or there is a bug:

The documentation states that minDate and maxDate defaults to null. However, I get the deprecation warnings when I do not specify a datepicker-options object or if I specify a options object without a minDate and maxDate property.

Where are the default values?

It is really annoying that I have to specify a datepicker-options attribute in my HTML and define a useless options object vm.datepickerOptions = {minDate: null, maxDate: null}; in my controller to avoid getting the deprecation warnings.

I would like to instead have the default null values apply, as I have no need to do any configuration that requires a datepicker-options

Can we pretty please have the defaults back? :)

TueCN avatar Apr 05 '16 13:04 TueCN

It shouldn't be on the non-values - that is a bug and unintended behavior with the deprecation message.

We'll address this with 1.3.2.

wesleycho avatar Apr 05 '16 14:04 wesleycho

I didn't see this issue, but I believe my PR addresses this: #5747

deeg avatar Apr 05 '16 15:04 deeg