Recommend a JS calendar widget that handles both d

2020-06-06 01:24发布

I'm working on a Web app where users need to input a date and time. I've used this calendar widget before and it works fine:

http://www.dynarch.com/projects/calendar/

However, it hasn't been updated since 2005. I'm wondering if anyone knows of a better one.

The calendar in jQuery UI doesn't handle times. Only dates. I need something that will let the user input both date and time using one control.

5条回答
太酷不给撩
2楼-- · 2020-06-06 01:29

Well, jscalendar can be configured to provide a time selector, too, by setting showsTime:true in the setup parameters. And one should also set singleClick:false, I guess...

Sadly it does not seem to work properly. The current time is not read out of the inputField even after it has be written by jscalendar itself. So after changing the date the time is set back to 0:0 :-(

If you fix this, let me know, how :-)

Christoph

查看更多
该账号已被封号
3楼-- · 2020-06-06 01:41

I don't think anything exists that does both date and time (at least nothing really good).

The general practice seems to be to use a drop-down list or some variation of one. If you're looking for something more flexible, there is a jQuery plugin for a time picker that imitates the Google Calendar time picker interface which I find very usable.

http://labs.perifer.se/timedatepicker/

查看更多
Lonely孤独者°
4楼-- · 2020-06-06 01:44

I am not aware of any single widget which does both date and time well. Any combined widget I've seen is overly complex and confusing.

There are however independent date and time widgets which I use frequently: ClockPick and datePicker. Both are jQuery plugins, work great across browsers, and are very easy to customize.

查看更多
干净又极端
5楼-- · 2020-06-06 01:44

I realize this question was asked some time ago, no pun intended. But here is a great example of what you were looking for using Kendo UI

查看更多
戒情不戒烟
6楼-- · 2020-06-06 01:49

I found a quite good datetimepicker for jQueryUI. It's the timepicker addon from Trent Richardson.

It works great so far and can be heavily customized to e.g. support i18n and styles. Since I plugged it into an existing system I cannot use the jQueryUI themes but that is not an actual problem. After loading a theme I e.g. set a different background-image for the .ui-datepicker-header value.

When adding the datetimepicker to an input element you can also overwrite all strings and formats by handing over an object with the respective key-value pairs.

查看更多
登录 后发表回答