UNPKG

primeng-buddhist-year-datepicker

Version:

A PrimeNG v19 compatible Angular datepicker with Buddhist year (BE) calendar support for Thai localization and Buddhist users.

53 lines (39 loc) โ€ข 1.59 kB
# ๐Ÿ“… Primeng Buddhist Datepicker This library extends the [PrimeNG Datepicker](https://primeng.org/datepicker) to support **Buddhist Year (BE)** display. > โœ… Built with [Angular CLI](https://github.com/angular/angular-cli) > ๐Ÿ“ฆ Supports **PrimeNG** and **Angular** version mapping as shown below --- ## ๐Ÿ”„ Version Compatibility | Angular Version | Library Version | Install Command | |------------------------|----------------------------------------|----------------------------------------------------------| | `^19.0.0` and above | `primeng-buddhist-year-datepicker@19` | `npm i primeng-buddhist-year-datepicker@^19.0.0` | | `^17.0.0` to `<19.0.0` | `primeng-buddhist-year-datepicker@17` | `npm i primeng-buddhist-year-datepicker@^17.0.0` | > โš ๏ธ Make sure to match the correct version of the library with your Angular version. --- ## ๐Ÿงช Run Demo App To see the component in action: ```bash npm install ng serve ``` ## ๐Ÿงช Import Modules Into Component ``` import { DatePickerModule } from 'primeng-buddhist-year-datepicker'; ``` ## How to use selector datepicker the same as primeng add only [isBudhistYear] = true or false ``` @Component({ selector: 'your-component', standalone: true, imports: [DatePickerModule], template: ` <p-date-picker [isBudhistYear]="true" dateFormat="dd/mm/yy" placeholder="Select a date" ></<p-date-picker> ` }) export class YourComponent {} ```