jquery ui datepicker..我可以使其静态吗?
这是一个简单的问题。
我想创建一个没有任何可选日期的内联日历。我希望通过预设的隐藏输入字段选择日期。我应该使用日期选择器插件吗?这似乎是错误的使用方式,因为我并没有真正做任何选择。
任何人对此都有任何经验。只需要制作一个静态日历。
http://www.kelvinluck.com/assets/jquery/datePicker /v2/demo/inlineDatePicker.html
类似的东西,但没有可选择的日期或月份。
This is a simple question.
I want to create an inline calendar that does not have any selectable dates. I want the date to be selected by a preset hidden input field. Should I use the datepicker plugin. This seems like the wrong thing to use since I am not really doing any picking persay..
anyone have any exp with this. Just need to make a static calendar.
http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/inlineDatePicker.html
something like this but without dates or months selectable.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,您可以使用它来制作静态日历(但最好是如果您已经在使用一些 jquery ui 功能,这样就不需要下载额外的 js)。
您可以使用两个选项:
完整代码(工作)
您可以看到,日期选择器绑定到 div 而不是文本字段。
正文中的第一行是您可以定义静态日期的地方。请记住也使用在日期选择器中设置的格式。
Yes You can use it to make static calendar (but best if You are already using some jquery ui features so no additional js will be necessary for download).
You can use two options:
Full code (working)
You can see, that datepicker is bounded to div not textfield.
First line in body is place where You can define static date. Remember too use format that is also set in datepicker.
考虑到 jqueryui 的额外下载时间,我建议不要使用 jqueryui 并在页面上静态显示禁用的日期选择器。有更好的 php 库来输出日历,如果日历不是太复杂的话,甚至可以自己打印出来。
Considering the extra downloadtime for jqueryui, I would advice against resorting to use jqueryui and have a disabled datepicker staticly display on a page. There is better php libraries to output calendars, or even just print it out yourself, if the calendar is not too complex.