Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setTime not working with show2400 #781

Open
kszili opened this issue Dec 23, 2022 · 0 comments
Open

setTime not working with show2400 #781

kszili opened this issue Dec 23, 2022 · 0 comments
Labels

Comments

@kszili
Copy link

kszili commented Dec 23, 2022

I'm using the show2400 option to enable '24:00' in my timepicker. The timepicker shows correctly, '24:00' appears in the list and can be selected.

$('#EndTime').timepicker({
    timeFormat: 'H:i',
    minTime: new Date(0, 0, 0, 0, 30, 0),
    maxTime: new Date(0, 0, 0, 24, 0, 0),
    step: 30,
    show2400: true
});

However, when I try to use setTime to set the timepicker to this '24:00' value, it is set to '00:00'. Although '00:00' is not even in the list of allowed values.

$('#EndTime').timepicker('setTime', new Date(0, 0, 0, 24, 0, 0));

So how can I get this '24:00' value programatically selected? This seems like an issue.

As a workaround I can use:
$('#EndTime').val('24:00');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants