diff --git a/datePicker.go b/datePicker.go index 5e70cab..2d0af12 100644 --- a/datePicker.go +++ b/datePicker.go @@ -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))) diff --git a/timePicker.go b/timePicker.go index 34aa390..518c636 100644 --- a/timePicker.go +++ b/timePicker.go @@ -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)))