bendavis78 / paper-date-picker

Material design date picker component for polymer
http://bendavis78.github.io/paper-date-picker/
MIT License
225 stars 132 forks source link

min and max date break for some date strings #158

Closed bennypowers closed 7 years ago

bennypowers commented 7 years ago

when supplying an ISO date string such as "1950-03-12" to min-date, getFullYear() is not a function.

bendavis78 commented 7 years ago

I'm unable to reproduce this, but I've accepted a lot of PR's recently. Can you verify that it's still an issue for you?

bennypowers commented 7 years ago

was able to repro on the demo at webcomponents.org

$0
02:00:00.000 <paper-date-picker id=​"picker" class=​"x-scope paper-date-picker-0" narrow>​…​</paper-date-picker>​
02:00:00.000 $0.maxDate = '1950-03-12'
02:00:00.000 paper-date-picker.html:298 Uncaught TypeError: date.getFullYear is not a function
    at HTMLElement._getFullYear (paper-date-picker.html:298)
    at HTMLElement._computeEffect (polymer.html:1625)
    at HTMLElement._effectEffects (polymer.html:1448)
    at HTMLElement._propertySetter (polymer.html:1432)
    at HTMLElement.setter (polymer.html:1511)
    at <anonymous>:1:12