问题
I´m wondering how I could set the max date on the mobiscroll. I know that i should use the maxDate option but I cannot find how the string should be formatted anywhere. Can anyone help?
Thanks
回答1:
I'm not familiar with mobiscroll, but if I understood correctly, its documentation says that maxDate accepts the Date
global object. So, actually, the format can be anything accepted by the standard JavaScript Date
:
Here's a documentation for Date
from MDN: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date
And some examples of use quoted from it:
new Date("December 17, 1995 03:24:00");
new Date(1995,11,17);
new Date(1995,11,17,3,24,0);
来源:https://stackoverflow.com/questions/10947396/how-can-i-set-the-maxdate-for-mobiscroll