0
我爲我的jQuery Mobile網頁使用了DateBox2 PlugIn。如何以編程方式設置jQuery Mobile DateBox2中的DurationBox值?
我從一個可以長達多天(例如86400s)的JSON Webservice獲得持續時間(秒)。
我想使用標準的DateBox2持續時間顯示(如 「1 Day,00:00:00」)將其發佈到我的文本輸入中,但我所得到的僅僅是簡單的秒數值。我嘗試了一些.val(),.datebox(「setTheDate」,86400),.datebox(callFormat,...)的組合,但它們似乎都不起作用。
這裏是我的輸入字段:
<input class='period' type='text' readonly='readonly' data-role='datebox' data-options='{"mode": "durationbox", "showInitialValue": true, "useFocus": true}' />
提前感謝!
工程就像一個魅力,謝謝! – MutedMind