added the staticProp property for the DatePicker component to work correctly (#794)

* added the staticProp property for the Modal component to work correctly

* Update src/DatePicker/DatePicker.svelte

Co-authored-by: Eric Liu <ericyl.us@gmail.com>

* Update src/DatePicker/DatePicker.svelte

Co-authored-by: Eric Liu <ericyl.us@gmail.com>

Co-authored-by: Leonid <leo@garantum.ru>
Co-authored-by: Eric Liu <ericyl.us@gmail.com>
This commit is contained in:
stilet 2021-09-07 18:18:46 +03:00 committed by GitHub
commit bc0b048e30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -56,6 +56,9 @@
/** Set an id for the date picker element */
export let id = "ccs-" + Math.random().toString(36);
/** Set to `true` to use in component Modal */
export let flatpickrProps = {};
import {
createEventDispatcher,
setContext,
@ -138,6 +141,7 @@
maxDate,
minDate,
mode: $mode,
...flatpickrProps
},
base: inputRef,
input: inputRefTo,

View file

@ -70,6 +70,12 @@ export interface DatePickerProps
* @default "ccs-" + Math.random().toString(36)
*/
id?: string;
/**
* Set to true for correct using in Modal
* @default false
*/
staticProp?: boolean;
}
export default class DatePicker extends SvelteComponentTyped<