You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assigning minutes (for example 60 [0-59]), when setting the time using initDate={now.toISOString()}, will set time to the wrong position. If time is 8:40, it will set the minutes to the 8th position (Because 40/5 = 8, default minutes are in increments of 5).
8:50 will set minutes to the 10th position and so on.
Not sure if this is a bug or if I am setting up minutes incorrectly.
Doing something like this:
//in my constructor I am setting minutesArray up using a loop, 0-59. Tried both nums and strings
this.minutesArray = ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09'];
for(let i = 10 ; i < 60; i++){
this.minutesArray.push(String(i))
}
render() {
let now = new Date();
return (
<TimePicker
minutes={this.minutesArray}
onTimeSelected={(date)=>this.onTimeSelected(date))}
initDate={now.toISOString()}/>
);
}
If there is a way to set time to be 0-59 without increments of 5, that will also fix my problem.
Thanks
The text was updated successfully, but these errors were encountered:
eldenskloss
changed the title
60 minutes
minutes=60 minutes (none increments of 5) issue.
Aug 14, 2017
Assigning minutes (for example 60 [0-59]), when setting the time using initDate={now.toISOString()}, will set time to the wrong position. If time is 8:40, it will set the minutes to the 8th position (Because 40/5 = 8, default minutes are in increments of 5).
8:50 will set minutes to the 10th position and so on.
Not sure if this is a bug or if I am setting up minutes incorrectly.
Doing something like this:
//in my constructor I am setting minutesArray up using a loop, 0-59. Tried both nums and strings
this.minutesArray = ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09'];
for(let i = 10 ; i < 60; i++){
this.minutesArray.push(String(i))
}
render() {
}
If there is a way to set time to be 0-59 without increments of 5, that will also fix my problem.
Thanks
The text was updated successfully, but these errors were encountered: