适用于 Chrome 的日期选择器扩展
我需要一个 chrome 扩展程序,它可以为特定网页中的特定字段启动日期选择器。每当有人单击某个日期字段时,应向用户显示日期选择器,该选择器位于字段上方或网页中的任何位置,并将所选日期插入字段中。我一直在尝试这样做,但到目前为止还没有成功。以下是详细信息:
此扩展程序应处于活动状态的网页: http://www. smartfleetonline.co.in/internet/trans_hist.jsp
字段背后的代码是:
<input type="text" name="fromday" size="1" maxlength="2" value="">
<input type="text" name="frommonth" size="1" maxlength="2" value="">
<input type="text" name="fromyear" size="2" maxlength="4" value="">
<input type="text" name="today" size="1" maxlength="2" value="">
<input type="text" name="tomonth" size="1" maxlength="2" value="">
<input type="text" name="toyear" size="2" maxlength="4" value="">
即使是示例代码也会非常有帮助。如何在我的插件中包含 jQuery UI 元素? 或者有其他插件可以帮助我解决这个问题吗?
I need a chrome extension that will give me start a date picker for specific fields in a specific web page. Whenever someone clicks in one of the date fields a date picker should be show to the user, either above the fields or anywhere in the webpage and insert the selected date into the fields. I have been trying to do it, but no success so far. Here are the details:
The Webpage that this extension should be active: http://www.smartfleetonline.co.in/internet/trans_hist.jsp
The Code behind the fields is:
<input type="text" name="fromday" size="1" maxlength="2" value="">
<input type="text" name="frommonth" size="1" maxlength="2" value="">
<input type="text" name="fromyear" size="2" maxlength="4" value="">
<input type="text" name="today" size="1" maxlength="2" value="">
<input type="text" name="tomonth" size="1" maxlength="2" value="">
<input type="text" name="toyear" size="2" maxlength="4" value="">
Even sample code would be very helpful. How to include jQuery UI elements in my plugin?
Or is there any other plugin that will help me regarding this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么只适用于 Chrome,请尝试这个日期选择器: http://jqueryui.com/demos/datepicker/
当然,它适用于所有现代浏览器,因为它是 jQuery,并且您不关心用户正在使用的浏览器;)
Why only for Chrome, try this datepicker out: http://jqueryui.com/demos/datepicker/
Of course it will work for all modern browsers because it is a jQuery, and you don`t care about the browser the user is using ;)