mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
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:
parent
fec53820aa
commit
bc0b048e30
2 changed files with 10 additions and 0 deletions
|
@ -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,
|
||||
|
|
6
types/DatePicker/DatePicker.d.ts
vendored
6
types/DatePicker/DatePicker.d.ts
vendored
|
@ -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<
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue