1

I am after a JavaScript lib that either natively supports or may be easily extended to work in a variety of 'date picking' modes, where only the relevant time data is selected:

  • Time of day = 20:00
  • Date = 01/01/2020
  • Datetime = 20:00 01/01/2010
  • Day of week = Monday
  • Week of year = 20
  • Month of year = October
  • Year = 2010

Mind you, what is more important to me is that the UI intuitively conveys the fact that you are selecting a week and not a day, a month and not a datetime etc. Parsing the relevant data out is trivial.

Is anybody aware of any library remotely capable of achieving what I am looking for?

az_
  • 646
  • 1
  • 6
  • 13
  • 1
    [Stack Overflow is not a Recommendation Engine.](http://meta.stackexchange.com/a/128562/133242) Use the Google. – Matt Ball May 09 '12 at 04:32
  • It sounds like you can accomplish most of this simply by populating select (drop downs) in loops with the appropriate values. On a side note, I've used jQuery UI DatePicker in the past for basic date selection, not sure if it would provide additional insight, but it might have some of what you want. – ToddBFisher May 09 '12 at 04:44
  • Yeah, upon considering my options, I believe that simple select boxes are going to be the least painful option. – az_ May 09 '12 at 06:59

1 Answers1

3

You should check out DateTimePicker. It's mostly just an extension of DatePicker which adds various additional options for picking time.

Here's a link to question from a while ago showing a DatePicker modification that will allow you to select only the month and year.

I think a lot of what you want can actually be achieved by just modifying the options for DatePicker. Hopefully this will at least give you a better idea of how you can modify the original widget options to fit your requirements.

Community
  • 1
  • 1
domvoyt
  • 416
  • 3
  • 6