Bug fixing

This commit is contained in:
Alexei Anoshenko 2022-05-03 18:34:26 +03:00
parent 12fd5521e5
commit 54a867591c
2 changed files with 5 additions and 5 deletions

View File

@ -84,7 +84,7 @@ func (picker *datePickerData) remove(tag string) {
}
case DatePickerStep:
delete(picker.properties, DatePickerMax)
delete(picker.properties, DatePickerStep)
if picker.created {
removeProperty(picker.htmlID(), Step, picker.session)
}
@ -182,7 +182,7 @@ func (picker *datePickerData) set(tag string, value interface{}) bool {
case DatePickerValue:
oldDate := GetDatePickerValue(picker, "")
if date, ok := setTimeValue(DatePickerMax); ok {
if date, ok := setTimeValue(DatePickerValue); ok {
if date != oldDate {
if picker.created {
picker.session.runScript(fmt.Sprintf(`setInputValue('%s', '%s')`, picker.htmlID(), date.Format(dateFormat)))

View File

@ -13,7 +13,7 @@ const (
TimePickerMax = "time-picker-max"
TimePickerStep = "time-picker-step"
TimePickerValue = "time-picker-value"
timeFormat = "15:04"
timeFormat = "15:04:05"
)
// TimePicker - TimePicker view
@ -84,7 +84,7 @@ func (picker *timePickerData) remove(tag string) {
}
case TimePickerStep:
delete(picker.properties, TimePickerMax)
delete(picker.properties, TimePickerStep)
if picker.created {
removeProperty(picker.htmlID(), Step, picker.session)
}
@ -182,7 +182,7 @@ func (picker *timePickerData) set(tag string, value interface{}) bool {
case TimePickerValue:
oldTime := GetTimePickerValue(picker, "")
if time, ok := setTimeValue(TimePickerMax); ok {
if time, ok := setTimeValue(TimePickerValue); ok {
if time != oldTime {
if picker.created {
picker.session.runScript(fmt.Sprintf(`setInputValue('%s', '%s')`, picker.htmlID(), time.Format(timeFormat)))