English 中文(简体)
如何利用分类确定日期输入数据选择
原标题:how to set date input data-options using jquery

我正在使用<条码>。 JQuery

编辑:

my 问 题:如何利用舱位确定输入数据选择日期?

投入代码:

            <input 
                name="mydate" 
                id="mydate" 
                type="date"
                pickPageTheme="a"
                data-role="datebox"
                data-options= {"mode": "calbox" }  />
最佳回答

http://api.jquery.com/data/rel=“nofollow”>data( to parse the -data-options

$("#mydate").data("options", {
    mode: "calbox",
    highDates: ["2011-11-02", "2011-11-03"],
    highDatesAlt: ["2011-11-09", "2011-11-10"],
    pickPageOAHighButtonTheme: "b"
});

不要忘记,如果已经建立起来,以后再恢复植被:

$("#mydate").datebox("refresh");

http://www.un.org。 不幸的是,如果日箱植被自动由关于页数的移动框架生成,则上述代码便赢得了t工作(因为<条码>数据-选择><>代码>属性仅一度)。 为解决这一问题,您可使用<代码>options。 方法:

$("#jqmdb").datebox("option", {
    mode: "calbox",
    highDatesAlt: ["2011-11-09", "2011-11-10"],
    highDates: ["2011-11-02", "2011-11-03"],
    pickPageOAHighButtonTheme: "b"
});

但是,在这种情况下,你必须具体说明<代码>highDatesAlt> beforehighDates,或将忽略前者。

我更新了您的fiddle here

问题回答

如果你有这样的守则:

<input name="myMEETINGdate" id="mydate" type="date" data-role="datebox"
      data-options= {"mode": "calbox","dateFormat":"%m/%d/%Y","calUsePickers": true, "calNoHeader": true,"highDates": ["07-20-2012", "2011-12-25"] } >
</input>

使用:

$("#myminutesdate").datebox( "option",{highDates: ["2012-08-08", "2012-11-03"] });                       
$("#myminutesdate").datebox("refresh");

它不会像第一部法典那样发挥作用。 确保你有正确的名称和相应的身份识别资料。

矫正法:

<input name="myminutesdate" id="myminutesdate" type="date" data-role="datebox"
     data-options= {"mode": "calbox","dateFormat":"%m/%d/%Y","calUsePickers": true, "calNoHeader": true,"highDates": ["2012-12-07" , "2012-07-12"] }  >
</input>

它具有讽刺意味,但非常重要。 这种希望有助于。





相关问题
Java Checking number months

I think I figure out what question I am trying to ask I dont want get(Calendar.MONTH) I want the month not to be greater than the last caldendar month that is why i am doing month -1, i realize that ...

How to show custom events to a Kronolith calendar

I want to show events from an external source in the Kronolith calendar views. I don t want to do this by exporting the events to iCal and then showing them as an external calendar. The events are ...

How to reset a field when changing a date ui.datepicker.js

I m using ui.datepicker.js I have a form and when the date is changed I want that another field reset the status (this field is a dropdown select box). The case is the following: The user enter the ...

Calendar returns wrong month [duplicate]

Calendar rightNow = Calendar.getInstance(); String month = String.valueOf(rightNow.get(Calendar.MONTH)); After the execution of the above snippet, month gets a value of 10 instead of 11. How come?

How to determine if date/time is EDT or EST in Java?

I have a PDF that users must complete. The PDF has date and time fields on it. The PDF instructs the users to input the date and time in Eastern format (Not EST or EDT). When the user completes the ...

热门标签