Update DateInput

This commit is contained in:
Florian Bouillon 2019-11-15 11:12:23 +01:00
parent 78e572faf3
commit a61c8c4fe2
No known key found for this signature in database
GPG Key ID: B143FF27EF555D16

View File

@ -4,15 +4,16 @@ import DefaultInput from './DefaultInput'
/** /**
* *
* @class FMDateInput * @class FMDateInput
* @extends {FMInput} * @extends {DefaultInput}
*/ */
export default class DateInput extends DefaultInput { export default class DateInput extends DefaultInput {
public setValue(value: any) { public setValue(value: any) {
// handle GO null value // handle GO null value
const format = this.formatValue(value) const format = this.formatValue(value)
if (format) { if (typeof format === "object") {
this.element.valueAsDate = format this.element.valueAsDate = format
return
} }
this.element.value = "" this.element.value = ""
} }