views:

99

answers:

2

Hi everyone,

I'm in search for a jQuery-based Date/Time Selector. I have found a few that are quite nice, but one of my requirements is that I can provide a json/xml/etc source of available days/times and the control should only allow selections of available days/times.

Is anyone aware of a plugin that does this, or at least a plugin that could be modified to do this?

Thanks!

A: 

This plugin is pretty good and it should satisfy your requirements.
http://keith-wood.name/datepickRef.html

Notice onDate method: it allows you to control presentation of each particular date, including whether date is selectable or not.

Nikita Rybak
+1  A: 

I use jQuery UI's datepicker in conjunction with a plugin from Martin Milesich. It's a fantastic way to implement timepicking right next to the datepicking. It looks like the plugin has gone offline, but I uploaded the script so you can download it here: http://textsnip.com/19046f

Here is a screenshot:

alt text

It's very easy to implement. Just call the regular datepicker() method from jQuery UI and add a showTime: true parameter. Here is a sample:

$('#sample').datepicker({
  duration: '',
  showTime: true,
  constrainInput: false,
  stepMinutes: 1,
  stepHours: 1,
  altTimeField: '',
  time24h: false
});
James Skidmore