Open carolineberlemont opened 5 years ago
Hi @carolineberlemont,
basically by setting the date using Date.now()
(current seconds since 01.01.1970) or by setting the date to the beginning of the day.
https://codepen.io/DanielRuf/pen/zeYmpv
$('.datepicker').pickadate({
min: Date.now()
})
var curDate = new Date();
new Date(curDate.getFullYear(), curDate.getMonth(), curDate.getDate(), 0)
// Tue Jan 22 2019 00:00:00 GMT+0100 (Mitteleuropäische Normalzeit)
Thank you very much Daniel !
Unfortunelly, even with : min: Date.now(), the datepicker is disabled for today If I inspect the datpicker, I have this code :
div class="pickerday pickerday--infocus pickerday--today pickerday--disabled" data-pick="1548111600000" role="gridcell" aria-label="22 Janvier, 2019" aria-disabled="true">22
Can you share a codepen with us?
Ho yes, it's OK ! Thank you very much. It's only because I tried yesterday evening after 11pm and with the time différence, it's like we were already today. thank you!
So does the provided solution work for you?
I would like the minimum date of my calendar to be today (and not tomorrow). What should I write for "min"?