问题描述
我想知道如何在Mobiscroll上设置最大日期.我知道我应该使用maxDate选项,但是我找不到在任何地方都应该格式化字符串的方式.有人可以帮忙吗?
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?
谢谢
推荐答案
我不熟悉mobiscroll,但是如果我理解正确,它的文档说, maxDate 接受Date
全局对象.因此,实际上,格式可以是标准JavaScript Date
可接受的任何格式:
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
:
以下是MDN中Date
的文档: https://developer. mozilla.org/en/JavaScript/Reference/Global_Objects/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);
这篇关于如何为mobiscroll设置maxDate?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!