mirror of
https://github.com/dzeiocom/FormManager.git
synced 2025-04-23 11:22:11 +00:00
Updated DateInput to support a string
This commit is contained in:
parent
a9d86f6cae
commit
835a2747e8
@ -8,7 +8,10 @@ import FMInput from "../FMInput"
|
|||||||
*/
|
*/
|
||||||
export default class FMDateInput extends FMInput {
|
export default class FMDateInput extends FMInput {
|
||||||
|
|
||||||
setValue(value: Date) {
|
setValue(value: Date|string) {
|
||||||
|
if (typeof(value) == "string") {
|
||||||
|
value = new Date(value)
|
||||||
|
}
|
||||||
this.element.valueAsDate = value
|
this.element.valueAsDate = value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user