angularx-flatpickr
Version:
An angular 17.0+ wrapper for flatpickr
1 lines • 44.9 kB
Source Map (JSON)
{"version":3,"file":"angularx-flatpickr.mjs","sources":["../../../projects/angularx-flatpickr/src/lib/flatpickr-defaults.service.ts","../../../projects/angularx-flatpickr/src/lib/flatpickr.directive.ts","../../../projects/angularx-flatpickr/src/lib/flatpickr.module.ts","../../../projects/angularx-flatpickr/src/public-api.ts","../../../projects/angularx-flatpickr/src/angularx-flatpickr.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nexport type DisableEnableDate =\n | string\n | Date\n | { from: Date | string; to: Date | string }\n | ((date: Date) => boolean);\n\nexport interface FlatpickrDefaultsInterface {\n /**\n * Exactly the same as date format, but for the altInput field.\n */\n altFormat?: string;\n\n /**\n * \tShow the user a readable date (as per altFormat), but return something totally different to the server.\n */\n altInput?: boolean;\n\n /**\n * This class will be added to the input element created by the altInput option.\n * Note that `altInput` already inherits classes from the original input.\n */\n altInputClass?: string;\n\n /**\n * Allows the user to enter a date directly input the input field. By default, direct entry is disabled.\n */\n allowInput?: boolean;\n\n /**\n * Allows the preloading of an invalid date. When disabled, the field will be cleared if the provided date is invalid\n */\n allowInvalidPreload?: boolean;\n\n /**\n * Instead of `body`, appends the calendar to the specified node instead.\n */\n appendTo?: HTMLElement;\n\n /**\n * Defines how the date will be formatted in the aria-label for calendar days, using the same tokens as dateFormat. If you change this, you should choose a value that will make sense if a screen reader reads it out loud.\n */\n ariaDateFormat?: string;\n\n /**\n * Whether clicking on the input should open the picker.\n * You could disable this if you wish to open the calendar manually `with.open()`.\n */\n clickOpens?: boolean;\n\n /**\n * A string of characters which are used to define how the date will be displayed in the input box.\n * The supported characters are defined in the table below.\n */\n dateFormat?: string;\n /**\n * Initial value of the hour element.\n */\n defaultHour?: number;\n /**\n * Initial value of the minute element.\n */\n defaultMinute?: number;\n /**\n * Initial value of the seconds element.\n */\n defaultSeconds?: number;\n\n /**\n * See <a href=\"https://chmln.github.io/flatpickr/examples/#disabling-specific-dates\">disabling dates</a>.\n */\n disable?: DisableEnableDate[];\n\n /**\n * Set disableMobile to true to always use the non-native picker.\n * By default, Flatpickr utilizes native datetime widgets unless certain options (e.g. disable) are used.\n */\n disableMobile?: boolean;\n\n /**\n * See <a href=\"https://chmln.github.io/flatpickr/examples/#disabling-all-dates-except-select-few\">enabling dates</a>.\n */\n enable?: DisableEnableDate[];\n\n /**\n * Enables time picker.\n */\n enableTime?: boolean;\n\n /**\n * Enables seconds in the time picker.\n */\n enableSeconds?: boolean;\n /**\n * Allows using a custom date formatting function instead of the built-in handling for date formats using dateFormat, altFormat, etc.\n */\n formatDate?: (value: any) => string;\n /**\n * Adjusts the step for the hour input (incl. scrolling).\n */\n hourIncrement?: number;\n\n /**\n * Displays the calendar inline.\n */\n inline?: boolean;\n\n /**\n * The maximum date that a user can pick to (inclusive).\n */\n maxDate?: string | Date;\n\n /**\n * The minimum date that a user can start picking from (inclusive).\n */\n minDate?: string | Date;\n\n /**\n * The maximum time that a user can pick to (inclusive).\n */\n maxTime?: string;\n\n /**\n * The minimum time that a user can start picking from (inclusive).\n */\n minTime?: string;\n\n /**\n * Adjusts the step for the minute input (incl. scrolling).\n */\n minuteIncrement?: number;\n\n /**\n * Select a single date, multiple dates or a date range.\n */\n mode?: 'single' | 'multiple' | 'range';\n\n /**\n * HTML for the arrow icon, used to switch months.\n */\n nextArrow?: string;\n\n /**\n * Hides the day selection in calendar. Use it along with `enableTime` to create a time picker.\n */\n noCalendar?: boolean;\n\n /**\n * Provide a date for 'today', which will be used instead of \"new Date()\"\n */\n now?: Date | string | number;\n\n /**\n * Function that expects a date string and must return a Date object.\n */\n parseDate?: (str: string) => Date;\n\n /**\n * HTML for the left arrow icon.\n */\n prevArrow?: string;\n\n /**\n * Show the month using the shorthand version (ie, Sep instead of September).\n */\n shorthandCurrentMonth?: boolean;\n\n /**\n * Position the calendar inside the wrapper and next to the input element. (Leave `false` unless you know what you're doing).\n */\n static?: boolean;\n\n /**\n * Displays time picker in 24 hour mode without AM/PM selection when enabled.\n */\n time24hr?: boolean;\n\n /**\n * When true, dates will parsed, formatted, and displayed in UTC.\n * It's recommended that date strings contain the timezone, but not necessary.\n */\n utc?: boolean;\n\n /**\n * Enables display of week numbers in calendar.\n */\n weekNumbers?: boolean;\n\n /**\n * You may override the function that extracts the week numbers from a Date by supplying a getWeek function.\n * It takes in a date as a parameter and should return a corresponding string that you want to appear left of every week.\n */\n getWeek?: (date: Date) => string;\n\n /**\n * Custom elements and input groups.\n */\n wrap?: boolean;\n\n /**\n * Array of plugin instances to use.\n */\n plugins?: any[];\n\n /**\n * The locale object or string to use for the locale.\n */\n locale?: object | string;\n\n /**\n * Auto convert the ngModel value from a string to a date / array of dates / from - to date object depending on the `mode`\n */\n convertModelValue?: boolean;\n\n /**\n * The number of months shown.\n */\n showMonths?: number;\n\n /**\n * How the month should be displayed in the header of the calendar.\n */\n monthSelectorType?: 'static' | 'dropdown';\n\n /**\n * Array of HTML elements that should not close the picker on click.\n */\n ignoredFocusElements?: HTMLElement[];\n}\n\n@Injectable()\nexport class FlatpickrDefaults implements FlatpickrDefaultsInterface {\n /**\n * Exactly the same as date format, but for the altInput field.\n */\n altFormat: string = 'F j, Y';\n\n /**\n * \tShow the user a readable date (as per altFormat), but return something totally different to the server.\n */\n altInput: boolean = false;\n\n /**\n * This class will be added to the input element created by the altInput option.\n * Note that `altInput` already inherits classes from the original input.\n */\n altInputClass: string = '';\n\n /**\n * Allows the user to enter a date directly input the input field. By default, direct entry is disabled.\n */\n allowInput: boolean = false;\n\n /**\n * Allows the preloading of an invalid date. When disabled, the field will be cleared if the provided date is invalid\n */\n allowInvalidPreload: boolean = false;\n\n /**\n * Instead of `body`, appends the calendar to the specified node instead.\n */\n appendTo: HTMLElement | undefined = undefined;\n\n /**\n * Defines how the date will be formatted in the aria-label for calendar days, using the same tokens as dateFormat. If you change this, you should choose a value that will make sense if a screen reader reads it out loud.\n */\n ariaDateFormat?: string = 'F j, Y';\n\n /**\n * Whether clicking on the input should open the picker.\n * You could disable this if you wish to open the calendar manually `with.open()`.\n */\n clickOpens: boolean = true;\n\n /**\n * A string of characters which are used to define how the date will be displayed in the input box.\n * The supported characters are defined in the table below.\n */\n dateFormat: string = 'Y-m-d';\n\n /**\n * Initial value of the hour element.\n */\n defaultHour?: number = 12;\n\n /**\n * Initial value of the minute element.\n */\n defaultMinute?: number = 0;\n\n /**\n * Initial value of the seconds element.\n */\n defaultSeconds?: number = 0;\n\n /**\n * See <a href=\"https://chmln.github.io/flatpickr/examples/#disabling-specific-dates\">disabling dates</a>.\n */\n disable: DisableEnableDate[] = [];\n\n /**\n * Set disableMobile to true to always use the non-native picker.\n * By default, Flatpickr utilizes native datetime widgets unless certain options (e.g. disable) are used.\n */\n disableMobile: boolean = false;\n\n /**\n * See <a href=\"https://chmln.github.io/flatpickr/examples/#disabling-all-dates-except-select-few\">enabling dates</a>.\n */\n enable: DisableEnableDate[];\n\n /**\n * Enables time picker.\n */\n enableTime: boolean = false;\n\n /**\n * Enables seconds in the time picker.\n */\n enableSeconds: boolean = false;\n\n /**\n * Allows using a custom date formatting function instead of the built-in handling for date formats using dateFormat, altFormat, etc.\n */\n formatDate?: (value: any) => string = undefined;\n\n /**\n * Adjusts the step for the hour input (incl. scrolling).\n */\n hourIncrement: number = 1;\n\n /**\n * Displays the calendar inline.\n */\n inline: boolean = false;\n\n /**\n * The maximum date that a user can pick to (inclusive).\n */\n maxDate: string | Date | undefined = undefined;\n\n /**\n * The minimum date that a user can start picking from (inclusive).\n */\n minDate: string | Date | undefined = undefined;\n\n /**\n * The maximum time that a user can pick to (inclusive).\n */\n maxTime: string | undefined = undefined;\n\n /**\n * The minimum time that a user can start picking from (inclusive).\n */\n minTime: string | undefined = undefined;\n\n /**\n * Adjusts the step for the minute input (incl. scrolling).\n */\n minuteIncrement: number = 5;\n\n /**\n * Select a single date, multiple dates or a date range.\n */\n mode: 'single' | 'multiple' | 'range' = 'single';\n\n /**\n * HTML for the arrow icon, used to switch months.\n */\n nextArrow: string = '>';\n\n /**\n * Hides the day selection in calendar. Use it along with `enableTime` to create a time picker.\n */\n noCalendar: boolean = false;\n\n /**\n * Default now to the current date\n */\n now: Date | string | number = new Date();\n\n /**\n * Function that expects a date string and must return a Date object.\n */\n parseDate: (str: string) => Date;\n\n /**\n * HTML for the left arrow icon.\n */\n prevArrow: string = '<';\n\n /**\n * Show the month using the shorthand version (ie, Sep instead of September).\n */\n shorthandCurrentMonth: boolean = false;\n\n /**\n * Position the calendar inside the wrapper and next to the input element. (Leave `false` unless you know what you're doing).\n */\n static: boolean = false;\n\n /**\n * Displays time picker in 24 hour mode without AM/PM selection when enabled.\n */\n time24hr: boolean = false;\n\n /**\n * When true, dates will parsed, formatted, and displayed in UTC.\n * It's recommended that date strings contain the timezone, but not necessary.\n */\n utc: boolean = false;\n\n /**\n * Enables display of week numbers in calendar.\n */\n weekNumbers: boolean = false;\n\n /**\n * You may override the function that extracts the week numbers from a Date by supplying a getWeek function.\n * It takes in a date as a parameter and should return a corresponding string that you want to appear left of every week.\n */\n getWeek: (date: Date) => string;\n\n /**\n * Custom elements and input groups.\n */\n wrap: boolean = false;\n\n /**\n * Array of plugin instances to use.\n */\n plugins: any[] = [];\n\n /**\n * The locale object or string to use for the locale.\n */\n locale: object | string = 'default';\n\n /**\n * Auto convert the ngModel value from a string to a date / array of dates / from - to date object depending on the `mode`\n */\n convertModelValue: boolean = false;\n\n /**\n * The number of months shown.\n */\n showMonths: number = 1;\n\n /**\n * How the month should be displayed in the header of the calendar.\n */\n monthSelectorType: 'static' | 'dropdown' = 'static';\n\n /**\n * Array of HTML elements that should not close the picker on click.\n */\n ignoredFocusElements: HTMLElement[] = [];\n}\n","import {\n Directive,\n ElementRef,\n AfterViewInit,\n Input,\n Output,\n EventEmitter,\n OnChanges,\n SimpleChanges,\n OnDestroy,\n forwardRef,\n HostListener,\n Renderer2,\n PLATFORM_ID,\n Inject,\n} from '@angular/core';\nimport {\n FlatpickrDefaults,\n DisableEnableDate,\n FlatpickrDefaultsInterface,\n} from './flatpickr-defaults.service';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport flatpickr from 'flatpickr';\nimport { isPlatformBrowser } from '@angular/common';\n\nexport interface FlatPickrOutputOptions {\n selectedDates: Date[];\n dateString: string;\n instance: any;\n}\n\nexport interface FlatPickrDayCreateOutputOptions\n extends FlatPickrOutputOptions {\n dayElement: HTMLElement;\n}\n\nexport const FLATPICKR_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => FlatpickrDirective),\n multi: true,\n};\n\n@Directive({\n selector: '[mwlFlatpickr]',\n providers: [FLATPICKR_CONTROL_VALUE_ACCESSOR],\n exportAs: 'mwlFlatpickr',\n standalone: true,\n})\nexport class FlatpickrDirective\n implements AfterViewInit, OnChanges, OnDestroy, ControlValueAccessor\n{\n /**\n * Object-options that can be user for multiple instances of Flatpickr.\n * Option from this object is applied only if specific option is not specified.\n * Example:\n * ```typescript\n * options: FlatpickrDefaultsInterface = {\n * altFormat: 'd/m/Y', // will be ignored since altFormat is provided via specific attribute\n * altInput: true // will be used since specific attribute is not provided\n * };\n * ```\n * ```html\n * <input\n * class=\"form-control\"\n * type=\"text\"\n * mwlFlatpickr\n * [options]=\"options\"\n * altFormat=\"d/m/Y\">\n * ```\n */\n @Input() options: FlatpickrDefaultsInterface = {};\n\n /**\n * Exactly the same as date format, but for the altInput field.\n */\n @Input() altFormat: string;\n\n /**\n * \tShow the user a readable date (as per altFormat), but return something totally different to the server.\n */\n @Input() altInput: boolean;\n\n /**\n * This class will be added to the input element created by the altInput option.\n * Note that `altInput` already inherits classes from the original input.\n */\n @Input() altInputClass: string;\n\n /**\n * Allows the user to enter a date directly input the input field. By default, direct entry is disabled.\n */\n @Input() allowInput: boolean;\n\n /**\n * Allows the preloading of an invalid date. When disabled, the field will be cleared if the provided date is invalid\n */\n @Input() allowInvalidPreload: boolean;\n\n /**\n * Instead of `body`, appends the calendar to the specified node instead.\n */\n @Input() appendTo: HTMLElement;\n\n /**\n * Defines how the date will be formatted in the aria-label for calendar days, using the same tokens as dateFormat. If you change this, you should choose a value that will make sense if a screen reader reads it out loud.\n */\n @Input() ariaDateFormat?: string;\n\n /**\n * Whether clicking on the input should open the picker.\n * You could disable this if you wish to open the calendar manually `with.open()`.\n */\n @Input() clickOpens: boolean;\n\n /**\n * A string of characters which are used to define how the date will be displayed in the input box.\n * The supported characters are defined in the table below.\n */\n @Input() dateFormat: string;\n\n /**\n * Initial value of the hour element.\n */\n @Input() defaultHour?: number;\n /**\n * Initial value of the minute element.\n */\n @Input() defaultMinute?: number;\n\n /**\n * Initial value of the seconds element.\n */\n @Input() defaultSeconds?: number;\n\n /**\n * See <a href=\"https://chmln.github.io/flatpickr/examples/#disabling-specific-dates\">disabling dates</a>.\n */\n @Input() disable: DisableEnableDate[];\n\n /**\n * Set disableMobile to true to always use the non-native picker.\n * By default, Flatpickr utilizes native datetime widgets unless certain options (e.g. disable) are used.\n */\n @Input() disableMobile: boolean;\n\n /**\n * See <a href=\"https://chmln.github.io/flatpickr/examples/#disabling-all-dates-except-select-few\">enabling dates</a>.\n */\n @Input() enable: DisableEnableDate[];\n\n /**\n * Enables time picker.\n */\n @Input() enableTime: boolean;\n\n /**\n * Enables seconds in the time picker.\n */\n @Input() enableSeconds: boolean;\n\n /**\n * Allows using a custom date formatting function instead of the built-in handling for date formats using dateFormat, altFormat, etc.\n */\n @Input() formatDate?: (value: any) => string;\n\n /**\n * Adjusts the step for the hour input (incl. scrolling).\n */\n @Input() hourIncrement: number;\n\n /**\n * Displays the calendar inline.\n */\n @Input() inline: boolean;\n\n /**\n * The maximum date that a user can pick to (inclusive).\n */\n @Input() maxDate: string | Date;\n\n /**\n * The minimum date that a user can start picking from (inclusive).\n */\n @Input() minDate: string | Date;\n\n /**\n * The maximum time that a user can pick to (inclusive).\n */\n @Input() maxTime: string;\n\n /**\n * The minimum time that a user can start picking from (inclusive).\n */\n @Input() minTime: string;\n\n /**\n * Adjusts the step for the minute input (incl. scrolling).\n */\n @Input() minuteIncrement: number;\n\n /**\n * Select a single date, multiple dates or a date range.\n */\n @Input() mode: 'single' | 'multiple' | 'range';\n\n /**\n * HTML for the arrow icon, used to switch months.\n */\n @Input() nextArrow: string;\n\n /**\n * Hides the day selection in calendar. Use it along with `enableTime` to create a time picker.\n */\n @Input() noCalendar: boolean;\n\n /**\n * Provide a date for 'today', which will be used instead of \"new Date()\"\n */\n @Input() now?: Date | string | number;\n\n /**\n * Function that expects a date string and must return a Date object.\n */\n @Input() parseDate: (str: string) => Date;\n\n /**\n * HTML for the left arrow icon.\n */\n @Input() prevArrow: string;\n\n /**\n * Show the month using the shorthand version (ie, Sep instead of September).\n */\n @Input() shorthandCurrentMonth: boolean;\n\n /**\n * The number of months shown.\n */\n @Input() showMonths: number;\n\n /**\n * Position the calendar inside the wrapper and next to the input element. (Leave `false` unless you know what you're doing).\n */\n @Input() static: boolean;\n\n /**\n * Displays time picker in 24 hour mode without AM/PM selection when enabled.\n */\n @Input() time24hr: boolean;\n\n /**\n * Enables display of week numbers in calendar.\n */\n @Input() weekNumbers: boolean;\n\n /**\n * You may override the function that extracts the week numbers from a Date by supplying a getWeek function.\n * It takes in a date as a parameter and should return a corresponding string that you want to appear left of every week.\n */\n @Input() getWeek: (date: Date) => string;\n\n /**\n * Custom elements and input groups.\n */\n @Input() wrap: boolean;\n\n /**\n * Array of plugin instances to use.\n */\n @Input() plugins: any[];\n\n /**\n * The locale object or string to use for the locale.\n */\n @Input() locale: object | string;\n\n /**\n * Auto convert the ngModel value from a string to a date / array of dates / from - to date object depending on the `mode`\n */\n @Input() convertModelValue: boolean;\n\n /**\n * How the month should be displayed in the header of the calendar.\n */\n @Input() monthSelectorType: 'static' | 'dropdown';\n\n /**\n * Array of HTML elements that should not close the picker on click.\n */\n @Input() ignoredFocusElements: HTMLElement[] = [];\n\n /**\n * Gets triggered once the calendar is in a ready state\n */\n @Output()\n flatpickrReady: EventEmitter<FlatPickrOutputOptions> = new EventEmitter();\n\n /**\n * Gets triggered when the user selects a date, or changes the time on a selected date.\n */\n @Output()\n flatpickrChange: EventEmitter<FlatPickrOutputOptions> = new EventEmitter();\n\n /**\n * Gets triggered when the input value is updated with a new date string.\n */\n @Output()\n flatpickrValueUpdate: EventEmitter<FlatPickrOutputOptions> =\n new EventEmitter();\n\n /**\n * Gets triggered when the calendar is opened.\n */\n @Output()\n flatpickrOpen: EventEmitter<FlatPickrOutputOptions> = new EventEmitter();\n\n /**\n * Gets triggered when the calendar is closed.\n */\n @Output()\n flatpickrClose: EventEmitter<FlatPickrOutputOptions> = new EventEmitter();\n\n /**\n * Gets triggered when the month is changed, either by the user or programmatically.\n */\n @Output()\n flatpickrMonthChange: EventEmitter<FlatPickrOutputOptions> =\n new EventEmitter();\n\n /**\n * Gets triggered when the year is changed, either by the user or programmatically.\n */\n @Output()\n flatpickrYearChange: EventEmitter<FlatPickrOutputOptions> =\n new EventEmitter();\n\n /**\n * Take full control of every date cell with this output\n */\n @Output()\n flatpickrDayCreate: EventEmitter<FlatPickrDayCreateOutputOptions> =\n new EventEmitter();\n\n /**\n * The flatpickr instance where you can call methods like toggle(), open(), close() etc\n */\n instance: flatpickr.Instance;\n\n private isDisabled = false;\n private initialValue: any;\n\n onChangeFn: (value: any) => void = () => {};\n\n @HostListener('blur')\n onTouchedFn = () => {};\n\n constructor(\n private elm: ElementRef,\n private defaults: FlatpickrDefaults,\n private renderer: Renderer2,\n @Inject(PLATFORM_ID) private platformId: Object,\n ) {}\n\n ngAfterViewInit(): void {\n const options: any = {\n altFormat: this.altFormat,\n altInput: this.altInput,\n altInputClass: this.altInputClass,\n allowInput: this.allowInput,\n allowInvalidPreload: this.allowInvalidPreload,\n appendTo: this.appendTo,\n ariaDateFormat: this.ariaDateFormat,\n clickOpens: this.clickOpens,\n dateFormat: this.dateFormat,\n defaultHour: this.defaultHour,\n defaultMinute: this.defaultMinute,\n defaultSeconds: this.defaultSeconds,\n disable: this.disable,\n disableMobile: this.disableMobile,\n enable: this.enable,\n enableTime: this.enableTime,\n enableSeconds: this.enableSeconds,\n formatDate: this.formatDate,\n hourIncrement: this.hourIncrement,\n defaultDate: this.initialValue,\n inline: this.inline,\n maxDate: this.maxDate,\n minDate: this.minDate,\n maxTime: this.maxTime,\n minTime: this.minTime,\n minuteIncrement: this.minuteIncrement,\n mode: this.mode,\n nextArrow: this.nextArrow,\n noCalendar: this.noCalendar,\n now: this.now,\n parseDate: this.parseDate,\n prevArrow: this.prevArrow,\n shorthandCurrentMonth: this.shorthandCurrentMonth,\n showMonths: this.showMonths,\n monthSelectorType: this.monthSelectorType,\n static: this.static,\n time24hr: this.time24hr,\n weekNumbers: this.weekNumbers,\n getWeek: this.getWeek,\n wrap: this.wrap,\n plugins: this.plugins,\n locale: this.locale,\n ignoredFocusElements: this.ignoredFocusElements,\n onChange: (selectedDates: Date[], dateString: string, instance: any) => {\n this.flatpickrChange.emit({ selectedDates, dateString, instance });\n },\n onOpen: (selectedDates: Date[], dateString: string, instance: any) => {\n this.flatpickrOpen.emit({ selectedDates, dateString, instance });\n },\n onClose: (selectedDates: Date[], dateString: string, instance: any) => {\n this.flatpickrClose.emit({ selectedDates, dateString, instance });\n },\n onMonthChange: (\n selectedDates: Date[],\n dateString: string,\n instance: any,\n ) => {\n this.flatpickrMonthChange.emit({ selectedDates, dateString, instance });\n },\n onYearChange: (\n selectedDates: Date[],\n dateString: string,\n instance: any,\n ) => {\n this.flatpickrYearChange.emit({ selectedDates, dateString, instance });\n },\n onReady: (selectedDates: Date[], dateString: string, instance: any) => {\n this.flatpickrReady.emit({ selectedDates, dateString, instance });\n },\n onValueUpdate: (\n selectedDates: Date[],\n dateString: string,\n instance: any,\n ) => {\n this.flatpickrValueUpdate.emit({ selectedDates, dateString, instance });\n },\n onDayCreate: (\n selectedDates: Date[],\n dateString: string,\n instance: any,\n dayElement: HTMLElement,\n ) => {\n this.flatpickrDayCreate.emit({\n selectedDates,\n dateString,\n instance,\n dayElement,\n });\n },\n };\n\n Object.keys(options).forEach((key) => {\n if (typeof options[key] === 'undefined') {\n if (typeof (this.options as any)[key] !== 'undefined') {\n options[key] = (this.options as any)[key];\n } else {\n options[key] = (this.defaults as any)[key];\n }\n }\n });\n\n // @ts-ignore\n options.time_24hr = options.time24hr;\n\n // workaround bug in flatpickr 4.6 where it doesn't copy the classes across\n // TODO - remove once fix in https://github.com/flatpickr/flatpickr/issues/1860 is released\n options.altInputClass =\n (options.altInputClass || '') + ' ' + this.elm.nativeElement.className;\n\n if (!options.enable) {\n delete options.enable;\n }\n\n if (isPlatformBrowser(this.platformId)) {\n this.instance = flatpickr(\n this.elm.nativeElement,\n options,\n ) as flatpickr.Instance;\n this.setDisabledState(this.isDisabled);\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (this.instance) {\n Object.keys(changes).forEach((inputKey) => {\n this.instance.set(inputKey as any, (this as any)[inputKey]);\n });\n }\n }\n\n ngOnDestroy(): void {\n if (this.instance) {\n this.instance.destroy();\n }\n }\n\n writeValue(value: any): void {\n let convertedValue: any = value;\n if (this.convertModelValue && this.mode === 'range' && value) {\n convertedValue = [value.from, value.to];\n }\n\n if (this.instance) {\n this.instance.setDate(convertedValue);\n } else {\n // flatpickr hasn't been initialised yet, store the value for later use\n this.initialValue = convertedValue;\n }\n }\n\n registerOnChange(fn: any): void {\n this.onChangeFn = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouchedFn = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.isDisabled = isDisabled;\n if (this.instance) {\n if (this.isDisabled) {\n this.renderer.setProperty(this.instance._input, 'disabled', 'disabled');\n } else {\n this.renderer.removeAttribute(this.instance._input, 'disabled');\n }\n }\n }\n\n @HostListener('input')\n inputChanged(): void {\n const value: string = this.elm.nativeElement.value;\n if (this.convertModelValue && typeof value === 'string') {\n switch (this.mode) {\n case 'multiple':\n const dates: Array<Date | undefined> = value\n .split('; ')\n .map((str) =>\n this.instance.parseDate(\n str,\n this.instance.config.dateFormat,\n !this.instance.config.enableTime,\n ),\n );\n this.onChangeFn(dates);\n break;\n\n case 'range':\n const [from, to] = value\n .split(this.instance.l10n.rangeSeparator)\n .map((str) =>\n this.instance.parseDate(\n str,\n this.instance.config.dateFormat,\n !this.instance.config.enableTime,\n ),\n );\n this.onChangeFn({ from, to });\n break;\n\n case 'single':\n default:\n this.onChangeFn(\n this.instance.parseDate(\n value,\n this.instance.config.dateFormat,\n !this.instance.config.enableTime,\n ),\n );\n }\n } else {\n this.onChangeFn(value);\n }\n }\n}\n","import {\n NgModule,\n ModuleWithProviders,\n InjectionToken,\n Provider,\n} from '@angular/core';\nimport { FlatpickrDirective } from './flatpickr.directive';\nimport {\n FlatpickrDefaults,\n FlatpickrDefaultsInterface,\n} from './flatpickr-defaults.service';\n\nexport const USER_DEFAULTS = new InjectionToken('flatpickr defaults');\n\nexport function provideFlatpickrDefaults(\n userDefaults: FlatpickrDefaultsInterface = {},\n): Provider[] {\n return [\n {\n provide: USER_DEFAULTS,\n useValue: userDefaults,\n },\n {\n provide: FlatpickrDefaults,\n useFactory() {\n const defaults: FlatpickrDefaults = new FlatpickrDefaults();\n Object.assign(defaults, userDefaults);\n return defaults;\n },\n deps: [USER_DEFAULTS],\n },\n ];\n}\n\n/**\n * @deprecated Will be removed in the next major version. Please use the standalone `FlatpickrDirective` and `provideFlatpickrDefaults()` instead.\n */\n@NgModule({\n imports: [FlatpickrDirective],\n exports: [FlatpickrDirective],\n})\nexport class FlatpickrModule {\n static forRoot(\n userDefaults: FlatpickrDefaultsInterface = {},\n ): ModuleWithProviders<FlatpickrModule> {\n return {\n ngModule: FlatpickrModule,\n providers: provideFlatpickrDefaults(userDefaults),\n };\n }\n}\n","/*\n * Public API Surface of angularx-flatpickr\n */\n\nexport * from './lib/flatpickr.module';\nexport {\n FlatpickrDefaults,\n FlatpickrDefaultsInterface,\n} from './lib/flatpickr-defaults.service';\nexport { FlatpickrDirective } from './lib/flatpickr.directive';\n","/**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