amsul / pickadate.js

The mobile-friendly, responsive, and lightweight jQuery date & time input picker.
http://amsul.ca/pickadate.js
MIT License
7.7k stars 1.01k forks source link

Setting pickatime end value to midnight or later #1125

Open justkd opened 5 years ago

justkd commented 5 years ago

Referencing #916 and #692 for being similar issues that I think weren't explained clearly.

It doesn't appear that we can set the end time to midnight or later. For example:

// 7AM to 11PM works fine.

$('.timepicker').pickatime({
    min: [7,00],
    max: [23,00]
})

// But list from 7:00 AM to Midnight - Does not work. The drop down doesn't populate at all.

$('.timepicker').pickatime({
    min: [7,00],
    max: [24,00]
})

We're asking if there's a way to have the list run from a start time until AFTER 11:30pm.

Such as 7:00 AM to Midnight.

7:00 AM 7:30 AM 8:00 AM ... ... ... 11:00 PM 11:30 PM 12:00 AM

DanielRuf commented 5 years ago

Hi, can you provide a codepen so we can test it easier?

justkd commented 5 years ago

@DanielRuf

https://codepen.io/justKD/pen/XoRZeV

OrangeOlko commented 5 years ago

Hello,

we also are trying to find a way to set time like:

till 23:59 without interval 1 or till 00:00 (that is shown after 23:50, not in the beginning of list).

It will be great if there is a way.

emnik commented 5 years ago

Is 23:59 possible with a 30 min internal in version 5?

ErnestBrandi commented 5 years ago

I also need this. I found this is because of the for loop line 1037 of picker.js file; but as it is a generic function used to build many elements of the plugin it is tricky to modify.

bluestarstudios commented 4 years ago

Just like the comments above, our application has the need for people to be able to set the end-time up to 24h after the start time. For an appointment starting at 7 pm, we need to allow all hours from 7pm to 7pm the following day. We can dynamically set the 'min' but (as outlined above) the 'max' can't seem to be set to anything past [23,59]. Please help.

bluestarstudios commented 2 years ago

Checking in on the progress of this as it's been over 4 years since the original post and this still seems to be unaddressed. Thanks!