Browse Source

Updated DateInput to support a string

tags/0.2.0
Florian Bouillon 3 months ago
parent
commit
835a2747e8
Signed by: Avior <florian.bouillon@delta-wings.net> GPG Key ID: B143FF27EF555D16
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      modules/FMDateInput.ts

+ 4
- 1
modules/FMDateInput.ts View File

@@ -8,7 +8,10 @@ import FMInput from "../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
}



Loading…
Cancel
Save