Skip to content

Commit

Permalink
toml strigifies dates fields value as string instead of date fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maliknajjar committed Sep 27, 2024
1 parent 3d5b105 commit ef60494
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/guifier/fields/baseFields/DateField/DateField.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ export class DateField extends Field {
*/
private inputEventHandler (event: Event): void {
const element = event.target as HTMLInputElement
this.setValue(element.value)
this.setValue(new Date(element.value))
}
}
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async function init (): Promise<void> {
fullScreen: true,
onChange: () => {
console.log('guifier has changed')
console.log(guifier.getData(DataType.Json))
console.log(guifier.getData(DataType.Toml))
}
}

Expand Down

0 comments on commit ef60494

Please sign in to comment.