forked from mbk-lab/rui_orig
Bug fixing
This commit is contained in:
parent
12fd5521e5
commit
54a867591c
|
@ -84,7 +84,7 @@ func (picker *datePickerData) remove(tag string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
case DatePickerStep:
|
case DatePickerStep:
|
||||||
delete(picker.properties, DatePickerMax)
|
delete(picker.properties, DatePickerStep)
|
||||||
if picker.created {
|
if picker.created {
|
||||||
removeProperty(picker.htmlID(), Step, picker.session)
|
removeProperty(picker.htmlID(), Step, picker.session)
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ func (picker *datePickerData) set(tag string, value interface{}) bool {
|
||||||
|
|
||||||
case DatePickerValue:
|
case DatePickerValue:
|
||||||
oldDate := GetDatePickerValue(picker, "")
|
oldDate := GetDatePickerValue(picker, "")
|
||||||
if date, ok := setTimeValue(DatePickerMax); ok {
|
if date, ok := setTimeValue(DatePickerValue); ok {
|
||||||
if date != oldDate {
|
if date != oldDate {
|
||||||
if picker.created {
|
if picker.created {
|
||||||
picker.session.runScript(fmt.Sprintf(`setInputValue('%s', '%s')`, picker.htmlID(), date.Format(dateFormat)))
|
picker.session.runScript(fmt.Sprintf(`setInputValue('%s', '%s')`, picker.htmlID(), date.Format(dateFormat)))
|
||||||
|
|
|
@ -13,7 +13,7 @@ const (
|
||||||
TimePickerMax = "time-picker-max"
|
TimePickerMax = "time-picker-max"
|
||||||
TimePickerStep = "time-picker-step"
|
TimePickerStep = "time-picker-step"
|
||||||
TimePickerValue = "time-picker-value"
|
TimePickerValue = "time-picker-value"
|
||||||
timeFormat = "15:04"
|
timeFormat = "15:04:05"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TimePicker - TimePicker view
|
// TimePicker - TimePicker view
|
||||||
|
@ -84,7 +84,7 @@ func (picker *timePickerData) remove(tag string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
case TimePickerStep:
|
case TimePickerStep:
|
||||||
delete(picker.properties, TimePickerMax)
|
delete(picker.properties, TimePickerStep)
|
||||||
if picker.created {
|
if picker.created {
|
||||||
removeProperty(picker.htmlID(), Step, picker.session)
|
removeProperty(picker.htmlID(), Step, picker.session)
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ func (picker *timePickerData) set(tag string, value interface{}) bool {
|
||||||
|
|
||||||
case TimePickerValue:
|
case TimePickerValue:
|
||||||
oldTime := GetTimePickerValue(picker, "")
|
oldTime := GetTimePickerValue(picker, "")
|
||||||
if time, ok := setTimeValue(TimePickerMax); ok {
|
if time, ok := setTimeValue(TimePickerValue); ok {
|
||||||
if time != oldTime {
|
if time != oldTime {
|
||||||
if picker.created {
|
if picker.created {
|
||||||
picker.session.runScript(fmt.Sprintf(`setInputValue('%s', '%s')`, picker.htmlID(), time.Format(timeFormat)))
|
picker.session.runScript(fmt.Sprintf(`setInputValue('%s', '%s')`, picker.htmlID(), time.Format(timeFormat)))
|
||||||
|
|
Loading…
Reference in New Issue