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

Hours in one input and minutes in another not working #121

Open
ConnorIngold opened this issue Mar 6, 2019 · 1 comment
Open

Hours in one input and minutes in another not working #121

ConnorIngold opened this issue Mar 6, 2019 · 1 comment

Comments

@ConnorIngold
Copy link

So I'm I following a design which requires me to have hours in one input and minutes in another.

Here is the config I'm using:

`$('.timepickerHour').timepicker({
timeFormat: 'hh ',
interval: 15,
minTime: '10',
maxTime: '6:00pm',
defaultTime: 'now',
startTime: '10:00',
dynamic: false,
dropdown: true,
scrollbar: true
});

$('.timepickerMinute').timepicker({
timeFormat: 'mm p',
interval: 10,
minTime: '11',
maxTime: '12:50pm',
defaultTime: '11',
startTime: '11:00',
dynamic: false,
dropdown: true,
scrollbar: true
});

          <input type="text" class="time-field1 timepickerHour" placeholder="08h">
          <input type="text" class="time-field2 timepickerMinute" placeholder="30m">

`

If you go on the doc's and input the above config you will see that it is quite janky meaning it will let you select some of the drop-down options but not others.

@ConnorIngold ConnorIngold changed the title Hours in one input and minute in another ? Hours in one input and minutes in another not working Mar 6, 2019
@eleonorsomosot
Copy link

eleonorsomosot commented Jun 27, 2019

I can confirm this. Trying this implementation as well.

UPDATE:
My workaround is having this config for minute timepicker..

timeFormat: 'H:mm',
interval: 5,
minHour: 0,
maxHour: 0,
maxMinutes: 55,

Then on change event, I just get the minute value, omitting/removing the hour.

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

No branches or pull requests

2 participants