Extend time range to 24 o'clock


in a time picker range, I need the user to be able to select ‘00:00’ (which is greyed out and isn’t selectable, as it’s smaller than the start time) or - even better - ‘24:00’ as an end time in a time range. I tried various settings with min/max/minTime/maxTime, etc., but none of it changed the time selection in that way.

In case it matters, I use 15-minute steps, so 23:59 is not an option. I also use time zones (exclusive end dates).

Is this somehow possible?

Thanks in advance, Alex

the min and max options are limiting the minimum/maximum values that can be selected. Their value can be a date, for instance: min: '2021-08-22T08:00'. The minTime and maxTime are limiting the the minimum/maximum time that is selectable (think of it as per day - minTime: '08:00').
When minTime is set, none of the earlier times is selectable.
24:00 is not selectable with exclusiveEndDates: true. It’d be possible only if no time-zones is used.

Hi Istvan,

thanks for your reply. So I tried unsetting the timezone (also on global level) and then setting exclusiveEndDates to false, but it still doesn’t let me select 00:00 or 24:00 as an end time.

dt_time_range = datepicker('#time_range', {
  controls: [ 'time' ],
  display: 'anchored',
  select: 'range',
  stepMinute: 15,
  timeFormat: 'HH:mm',

  // dataTimezone: null,
  exclusiveEndDates: false,
  min: '2024-02-23T00:00',
  max: '2024-02-24T00:00',
  minRange: 1000*60*15,

  // unrelated
  touchUi: false,
  showOverlay: false

I also tried '2024-02-23T24:00' as an end date.

Did I miss something?


It would only work if you’d use date as well: controls: [ 'time', 'date' ], using just 'time' won’t let you pick 00:00 as an end-date, because that already belongs to the next day.

Ok, that’s very unfortunate.

Adding a date value to this is not possible, as it would confuse the end user.

Why isn’t there an option to select 24:00 o’clock? If I understand it correct, exclusiveEndDates is exactly for this, as it wouldn’t reach into the next day?

I understand that this is a critical feature for you and I am going to pass this to the dev team to take it in consideration and I will add your voice to it so you’ll get notified if there are updates.