mirror of
https://github.com/dzeiocom/FormManager.git
synced 2025-07-29 08:19:51 +00:00
first commit
This commit is contained in:
28
modules/FMDateInput.ts
Normal file
28
modules/FMDateInput.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import { FMAssignInterface } from './../Interfaces';
|
||||
import FMInput from "../FMInput"
|
||||
|
||||
/**
|
||||
*
|
||||
* @class FMDateInput
|
||||
* @extends {FMInput}
|
||||
*/
|
||||
export default class FMDateInput extends FMInput {
|
||||
|
||||
setValue(value: Date) {
|
||||
this.element.valueAsDate = value
|
||||
}
|
||||
|
||||
getValue(): Date {
|
||||
return this.element.valueAsDate
|
||||
}
|
||||
|
||||
getDefault(args: string): Date {
|
||||
return new Date
|
||||
}
|
||||
}
|
||||
|
||||
export const FMDateInputAssignement: FMAssignInterface = {
|
||||
input: FMDateInput,
|
||||
type: "date",
|
||||
tagName: "input"
|
||||
}
|
Reference in New Issue
Block a user