Make class's default time now to fix date jump bug

This commit is contained in:
Tanner Collin 2022-03-19 01:19:24 +00:00
parent f85c21ef3c
commit ff267cc32c

View File

@ -259,7 +259,11 @@ function InstructorClassEditor(props) {
<label>Time and Date</label> <label>Time and Date</label>
<Datetime <Datetime
timeConstraints={{ minutes: { step: 15 } }} timeConstraints={{ minutes: { step: 15 } }}
value={ input.datetime ? moment.utc(input.datetime).tz('America/Edmonton') : (new Date()).setMinutes(0) } value={ input.datetime ?
moment.utc(input.datetime).tz('America/Edmonton')
:
moment().tz('America/Edmonton').set({ minute: 0 })
}
onChange={handleDatetime} onChange={handleDatetime}
input={false} input={false}
/> />