dbushell/Pikaday — pull request #182 by JeroenVdb (2014-08-26 17:26:25+00:00)
Title: Extra isValid() check with Moment.js  before setting defaultDate()

When changing the datepicker input value with an invalid date string and then initiating Pikaday. The defaultDate will be set to the minDate.

Case: when you have a HTML5 placeholder polyfill for IE8 (setting the placeholder attribute value to be the value of the value attribute).

Wat goes wrong?
- browser to the website with IE8 and with a placeholder polyfill
- (#datepicker value is set to 'from')
- click on external link
- use the browsers back button
- IE8 remembers the 'from' value and Pikaday sets a wrong date