A powerfull Form Manager https://dze.io
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
489 B

  1. import { FMAssignInterface } from './../Interfaces';
  2. import FMInput from "../FMInput"
  3. /**
  4. *
  5. * @class FMDateInput
  6. * @extends {FMInput}
  7. */
  8. export default class FMDateInput extends FMInput {
  9. setValue(value: Date) {
  10. this.element.valueAsDate = value
  11. }
  12. getValue(): Date {
  13. return this.element.valueAsDate
  14. }
  15. getDefault(args: string): Date {
  16. return new Date
  17. }
  18. }
  19. export const FMDateInputAssignement: FMAssignInterface = {
  20. input: FMDateInput,
  21. type: "date",
  22. tagName: "input"
  23. }