支持多种格式的jQuery Datepicker [英] jQuery Datepicker that supports multiple formats

查看:147
本文介绍了支持多种格式的jQuery Datepicker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有人可以建议一个插件或解决方案,使我可以同时使用具有多种输入日期格式的jQuery datepicker插件.这将允许用户以任何指定的格式输入日期.即:

I'm wondering if anyone can suggest a plugin or solution that would allow me to use the jQuery datepicker plugin with multiple input date formats at the same time. This would allow the user to enter the date in any of the specified formats. I.e.:

3 31 10
3/31/2010
3-31-10

我不太在乎用户跳出标签后该值是否被扭曲为一种特定格式.一个好的输入屏蔽插件可能也可以达到我的目的,但是这个流行的插件似乎希望每个插件都具有固定的基数该字段无效,因为我希望用户能够在3月输入3或03.

I don't really care if the value gets mangled to one of the specific formats after the user tabs out. A good input masking plugin might work for my purpose too, however, this popular one seems to expect a fixed cardinality for each of the fields, which won't work because I want the user to be able to enter 3 or 03 for the month of March, for example.

推荐答案

此'日期选择器小工具V 5'似乎可以接受多种格式.我对您提供的所有三种格式进行了快速测试,似乎每个人都被接受了.

This 'Unobtrusive Date-Picker Widget V5' seems to accept multiple formats. I did a quick test of all three of the formats you supplied, and everyone seemed to be accepted.

演示: http://www.frequency-decoder.com/demo /date-picker-v5/

这篇关于支持多种格式的jQuery Datepicker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆