chrisdavies / tiny-date-picker

A small, modern, dependency-free date picker
https://chrisdavies.github.io/tiny-date-picker/
415 stars 88 forks source link

Picker modal doesn't open when setting custom dates #103

Open antonioribeiro opened 5 years ago

antonioribeiro commented 5 years ago

When setting selectedDate and hilightedDate as custom dates nothing works, I mean, it does not open the picker modal:

this.datePicker.setState({
    selectedDate: new Date('2013/01/01'),
    hilightedDate: new Date('2013/01/01'),
})

this.datePicker.open()

But if I use now() as the selectedDate, it works fine:

this.datePicker.setState({
    selectedDate: new Date(),
    hilightedDate: new Date('2013/01/01'),
})

this.datePicker.open()