ankurk91 / vue-bootstrap-datetimepicker

Vue.js component for eonasdan bootstrap datetimepicker
MIT License
223 stars 66 forks source link

Bug or feature with maxDate config property? #29

Closed KorzhovDmitry closed 6 years ago

KorzhovDmitry commented 6 years ago

I'm submitting a Bug report

Tell about your platform

Current behavior When set config option "maxDate" to current date like maxDate: new Date() button "Go to today" dont change date to current date.

Expected behavior Button "Go to today" change date to current.

Way to avoid this behavior If i set "maxDate" like maxDate: new Date().setHours(23, 59, 59, 999) button works fine, but i think its a tricky way. May be need do checks in plugin?

ankurk91 commented 6 years ago

What if you pass moment() as maxDate ?

Can you fork this jsfiddle and setup your code there ? https://jsfiddle.net/ankurk91/zupazg2u/

KorzhovDmitry commented 6 years ago

I create example with comments. https://jsfiddle.net/daruqe05/10/

ankurk91 commented 6 years ago

This is not working in original datepicker also. Here is the jsfiddle that is not using vue.js

https://jsfiddle.net/mk9k1dpd/2/