ngx-mat-persian-datepicker
v0.0.4
Published
Simplified usage for Angular Material Datepicker component for Persian calendar
Downloads
3
Maintainers
Readme
NGX MAT Persian DatePicker
Simplified Angular material datepicker usage for Persian calendar
Installation
Peer Dependencies
npm install material-jalali-moment-adapter @angular/material-moment-adapter @angular/material
Library
npm install ngx-mat-persian-datepicker
Usage
The following usage demonstrate the usage within standalone components, but you can import the component into the NgModules too.
The only mandatory field is Control
which is normal FormControl
. And it is
required due to MatFormField
usage.
@Component({
standalonde: true,
imports: [NgxMatPersianDatepicker],
template: `
<ngx-mat-persian-datepicker
[control]="formControl"
></ngx-mat-persian-datepicker>
`
})
class myComponent {}
Available Fields
| Name | Type | Usage | |--------------|--------------------------------------|-----------------------------------------------------| | id | string | Unique identifier for element | | label | string | The string to display on input as placeholder | | errorMessage | string | The message to show in case of error on the control | | control | FormControl(From ReactiveFormModule) | The FormControl that will be used to store date |