简体   繁体   English

使用JQuery Mobile ui-datepicker保存日期/事件

[英]Save Dates / Events with JQuery Mobile ui-datepicker

I am looking into the JQuery Mobile Calendar UI-DatePicker. 我正在研究JQuery移动日历UI-DatePicker。

It can be found here: http://jquerymobile.com/test/experiments/ui-datepicker/ 可以在这里找到: http : //jquerymobile.com/test/experiments/ui-datepicker/

Does anyone know how to save dates / events on it? 有谁知道如何在上面保存日期/事件?

Thanks 谢谢

The jQuery Mobile UI-Datepicker, just like any other datepicker widget, simply updates the value placed in the input box. 就像任何其他datepicker小部件一样,jQuery Mobile UI-Datepicker只是更新放置在输入框中的值。 If a user clicks the calendar day for today, the text '04/05/2011' will be placed in the input box. 如果用户单击今天的日历日,则将在输入框中输入文字“ 04/05/2011”。 The widget does not do anything more than that. 窗口小部件不执行任何其他操作。

It is your job to take the value in that input box and do what you want with it. 您需要在该输入框中获取值并执行所需的操作。 Typically, you will wait for a user to submit a form, grab the date they entered, validate it, and store it somewhere. 通常,您将等待用户提交表单,获取他们输入的日期,对其进行验证并将其存储在某处。

As for where to store it, that is up to you. 至于存储在哪里,这取决于您。 One good way to store things in a Javascript web app like this is using a cross browser storage library like store.js . 在Java Web应用程序中存储内容的一种好方法是使用跨浏览器存储库(例如store.js)

I think you might have the date picker confused with a calendar control. 我认为您可能将日期选择器与日历控件混淆了。 This control is for selecting dates. 此控件用于选择日期。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM