Skip to content

Commit

Permalink
fix(Date Picker): clear incomplete range selection (#1074)
Browse files Browse the repository at this point in the history
Co-authored-by: Dabiel González Ramos <[email protected]>
  • Loading branch information
Cata1989 and dgonzalezr authored Jun 7, 2024
1 parent 2d46b9a commit 2b2b329
Show file tree
Hide file tree
Showing 7 changed files with 208 additions and 134 deletions.
22 changes: 11 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/beeq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@floating-ui/core": "^1.6.2",
"@floating-ui/dom": "^1.6.5",
"@stencil/core": "^4.18.3",
"cally": "0.6.1"
"cally": "0.7.1"
},
"repository": {
"type": "git",
Expand Down
16 changes: 12 additions & 4 deletions packages/beeq/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,9 @@ export namespace Components {
*/
"months": number;
/**
* The number of months to display per page when using next/previous buttons.
* Specifies how the next/previous buttons should navigate the calendar. - single: The buttons will navigate by a single month at a time. - months: The buttons will navigate by the number of months displayed per view.
*/
"monthsPerView": number;
"monthsPerView": 'single' | 'months';
/**
* The Date picker input name.
*/
Expand Down Expand Up @@ -422,6 +422,10 @@ export namespace Components {
* Defines the strategy to position the Date picker panel
*/
"strategy"?: 'fixed' | 'absolute';
/**
* The date that is tentatively selected e.g. the start of a range selection
*/
"tentative"?: string;
/**
* It defines how the calendar will behave, allowing single date selection, range selection, or multiple date selection
*/
Expand Down Expand Up @@ -2622,9 +2626,9 @@ declare namespace LocalJSX {
*/
"months"?: number;
/**
* The number of months to display per page when using next/previous buttons.
* Specifies how the next/previous buttons should navigate the calendar. - single: The buttons will navigate by a single month at a time. - months: The buttons will navigate by the number of months displayed per view.
*/
"monthsPerView"?: number;
"monthsPerView"?: 'single' | 'months';
/**
* The Date picker input name.
*/
Expand Down Expand Up @@ -2677,6 +2681,10 @@ declare namespace LocalJSX {
* Defines the strategy to position the Date picker panel
*/
"strategy"?: 'fixed' | 'absolute';
/**
* The date that is tentatively selected e.g. the start of a range selection
*/
"tentative"?: string;
/**
* It defines how the calendar will behave, allowing single date selection, range selection, or multiple date selection
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const meta: Meta = {
max: { control: 'text' },
min: { control: 'text' },
months: { control: 'number' },
'months-per-view': { control: 'number' },
'months-per-view': { control: 'select', options: ['single', 'months'] },
name: { control: 'text' },
open: { control: 'boolean' },
'panel-height': { control: 'text' },
Expand All @@ -53,6 +53,7 @@ const meta: Meta = {
'show-outside-days': { control: 'boolean' },
skidding: { control: 'number' },
strategy: { control: 'select', options: ['fixed', 'absolute'] },
tentative: { control: 'text' },
type: { control: 'select', options: [...DATE_PICKER_TYPE] },
'validation-status': { control: 'select', options: [...INPUT_VALIDATION] },
value: { control: 'text' },
Expand Down Expand Up @@ -85,7 +86,7 @@ const meta: Meta = {
max: undefined,
min: undefined,
months: 1,
'months-per-view': 1,
'months-per-view': 'single',
name: 'bq-date-picker',
open: false,
'panel-height': 'auto',
Expand All @@ -95,6 +96,7 @@ const meta: Meta = {
'show-outside-days': false,
skidding: 0,
strategy: 'absolute',
tentative: undefined,
type: 'single',
'validation-status': 'none',
value: undefined,
Expand Down Expand Up @@ -177,6 +179,7 @@ const Template = (args: Args) => {
show-outside-days=${args['show-outside-days']}
skidding=${args.skidding}
strategy=${args.strategy}
tentative=${args.tentative}
type=${args.type}
validation-status=${args['validation-status']}
value=${ifDefined(args.value)}
Expand Down
Loading

0 comments on commit 2b2b329

Please sign in to comment.