Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

datepickerPopup wrong deprecation warning for unspecified minDate/maxDate #5743

Closed
ndrsv opened this issue Apr 5, 2016 · 4 comments
Closed

Comments

@ndrsv
Copy link

ndrsv commented Apr 5, 2016

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

@evilaliv3
Copy link

I think this ticket could be closed as documented with the following pull request: #5732

@TueCN
Copy link

TueCN commented Apr 5, 2016

@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? :)

@wesleycho
Copy link
Contributor

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.

@deeg
Copy link
Contributor

deeg commented Apr 5, 2016

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

deeg added a commit to deeg/bootstrap that referenced this issue Apr 5, 2016
This stops the datepicker popup from incorrectly showing a warning when not supplying any datepicker options.

Fixes: angular-ui#5743
Closes angular-ui#5747
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants