0.0.5 • Published 5 years ago

gloin-datepicker v0.0.5

Weekly downloads
16
License
-
Repository
-
Last release
5 years ago

GloinDatepicker

An improved version of the material datepicker with custom date format, live date validation and custom messages

Usage

<gloin-datepicker  
  [defaultDateValue]="1466329148000"  
  [placeholder]="'Write date (YYYY/MM/DD)'"  
  [errorMessage]="'You are not cool'"  
  (onDateValidated)="loadDate($event)">  
</gloin-datepicker>
  
PropertyTypeDefault valueDescription
defaultDateValuenumbernullthe init value you want to be shown as default in the input and selected in the MatDatePicker component
placeholderstring(YYYY/MM/DD)The placeholder string to be shown in the input
disabledbooleanfalseAllows to enable/disable the input, allowing the input react to parent events
errorMessagestringWrong date format (YYYY/MM/DD)A custom error message string, shown when the date format is invalid
onDateValidatedEvent emitternullEmits the date value in milliseconds when it's validated

NPM Package: https://www.npmjs.com/package/gloin-datepicker

Git source code: https://github.com/afuentecruz/gloin-datepicker