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:
|
||||
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)))
|
||||
|
|
|
@ -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)))
|
||||
|
|
Loading…
Reference in New Issue