diff --git a/.changeset/twenty-mangos-grin.md b/.changeset/twenty-mangos-grin.md
new file mode 100644
index 00000000000..71ed4b2f426
--- /dev/null
+++ b/.changeset/twenty-mangos-grin.md
@@ -0,0 +1,5 @@
+---
+'@siemens/ix': patch
+---
+
+Improve responsive behaviour of `ix-datetime-picker` on small screens
diff --git a/packages/core/component-doc.json b/packages/core/component-doc.json
index ad52a530aa9..d9ea8c5a9cd 100644
--- a/packages/core/component-doc.json
+++ b/packages/core/component-doc.json
@@ -4423,7 +4423,7 @@
"name": "from",
"type": "string",
"complexType": {
- "original": "string | undefined",
+ "original": "string",
"resolved": "string",
"references": {}
},
@@ -4442,7 +4442,7 @@
"type": "string"
}
],
- "optional": false,
+ "optional": true,
"required": false
},
{
@@ -4490,13 +4490,12 @@
"text": "2.1.0"
}
],
- "default": "undefined",
"values": [
{
"type": "string"
}
],
- "optional": false,
+ "optional": true,
"required": false
},
{
@@ -4522,7 +4521,7 @@
"type": "string"
}
],
- "optional": false,
+ "optional": true,
"required": false
},
{
@@ -4548,7 +4547,7 @@
"type": "string"
}
],
- "optional": false,
+ "optional": true,
"required": false
},
{
@@ -4641,10 +4640,10 @@
},
{
"name": "showTimeReference",
- "type": "any",
+ "type": "boolean",
"complexType": {
- "original": "any",
- "resolved": "any",
+ "original": "boolean",
+ "resolved": "boolean",
"references": {}
},
"mutable": false,
@@ -4661,10 +4660,10 @@
"text": "1.1.0"
}
],
- "default": "undefined",
+ "default": "false",
"values": [
{
- "type": "any"
+ "type": "boolean"
}
],
"optional": false,
@@ -4698,7 +4697,7 @@
"type": "string"
}
],
- "optional": false,
+ "optional": true,
"required": false
},
{
@@ -4724,7 +4723,7 @@
"type": "string"
}
],
- "optional": false,
+ "optional": true,
"required": false
},
{
@@ -4777,14 +4776,14 @@
"type": "string"
}
],
- "optional": false,
+ "optional": true,
"required": false
},
{
"name": "to",
"type": "string",
"complexType": {
- "original": "string | undefined",
+ "original": "string",
"resolved": "string",
"references": {}
},
@@ -4803,7 +4802,7 @@
"type": "string"
}
],
- "optional": false,
+ "optional": true,
"required": false
},
{
diff --git a/packages/core/src/components.d.ts b/packages/core/src/components.d.ts
index 588eb0da58b..9672e2acb79 100644
--- a/packages/core/src/components.d.ts
+++ b/packages/core/src/components.d.ts
@@ -702,7 +702,7 @@ export namespace Components {
* The selected starting date. If the picker is not in range mode this is the selected date. Format has to match the `format` property.
* @since 1.1.0
*/
- "from": string | undefined;
+ "from"?: string;
/**
* Text of date select button
* @since 2.1.0
@@ -712,17 +712,17 @@ export namespace Components {
* Format of time string See {@link "https://moment.github.io/luxon/#/formatting?id=table-of-tokens"} for all available tokens.
* @since 2.1.0
*/
- "locale": string;
+ "locale"?: string;
/**
* The latest date that can be selected by the date picker. If not set there will be no restriction.
* @since 1.1.0
*/
- "maxDate": string;
+ "maxDate"?: string;
/**
* The earliest date that can be selected by the date picker. If not set there will be no restriction.
* @since 1.1.0
*/
- "minDate": string;
+ "minDate"?: string;
/**
* If true a date-range can be selected (from/to).
*/
@@ -744,18 +744,18 @@ export namespace Components {
* @see { this.timeFormat}
* @since 1.1.0
*/
- "showTimeReference": any;
+ "showTimeReference": boolean;
/**
* Text of date select button
* @since 1.1.0
* @deprecated since 2.1.0. Use `i18nDone`
*/
- "textSelectDate": string;
+ "textSelectDate"?: string;
/**
* Select time with format string
* @since 1.1.0
*/
- "time": string;
+ "time"?: string;
/**
* Time format string. See {@link "https://moment.github.io/luxon/#/formatting?id=table-of-tokens"} for all available tokens.
* @since 1.1.0
@@ -764,12 +764,12 @@ export namespace Components {
/**
* Set time reference
*/
- "timeReference": 'AM' | 'PM';
+ "timeReference"?: 'AM' | 'PM';
/**
* The selected end date. If the the picker is not in range mode this property has no impact. Format has to match the `format` property.
* @since 1.1.0
*/
- "to": string | undefined;
+ "to"?: string;
/**
* The index of which day to start the week on, based on the Locale#weekdays array. E.g. if the locale is en-us, weekStartIndex = 1 results in starting the week on monday.
* @since 2.1.0
@@ -4825,7 +4825,7 @@ declare namespace LocalJSX {
* The selected starting date. If the picker is not in range mode this is the selected date. Format has to match the `format` property.
* @since 1.1.0
*/
- "from"?: string | undefined;
+ "from"?: string;
/**
* Text of date select button
* @since 2.1.0
@@ -4887,7 +4887,7 @@ declare namespace LocalJSX {
* @see { this.timeFormat}
* @since 1.1.0
*/
- "showTimeReference"?: any;
+ "showTimeReference"?: boolean;
/**
* Text of date select button
* @since 1.1.0
@@ -4912,7 +4912,7 @@ declare namespace LocalJSX {
* The selected end date. If the the picker is not in range mode this property has no impact. Format has to match the `format` property.
* @since 1.1.0
*/
- "to"?: string | undefined;
+ "to"?: string;
/**
* The index of which day to start the week on, based on the Locale#weekdays array. E.g. if the locale is en-us, weekStartIndex = 1 results in starting the week on monday.
* @since 2.1.0
diff --git a/packages/core/src/components/date-dropdown/date-dropdown.scss b/packages/core/src/components/date-dropdown/date-dropdown.scss
index c1a376728e8..e77adadfcbd 100644
--- a/packages/core/src/components/date-dropdown/date-dropdown.scss
+++ b/packages/core/src/components/date-dropdown/date-dropdown.scss
@@ -42,6 +42,5 @@
.pull-right {
float: right;
- padding: $tiny-space $default-space;
- }
+ padding: 0 $default-space $medium-space $default-space; }
}
diff --git a/packages/core/src/components/date-picker/date-picker-component.ts b/packages/core/src/components/date-picker/date-picker-component.ts
index 93a1caf5c7f..831429dc251 100644
--- a/packages/core/src/components/date-picker/date-picker-component.ts
+++ b/packages/core/src/components/date-picker/date-picker-component.ts
@@ -38,12 +38,12 @@ export interface IxDatePickerComponent {
/**
* Annotae with @Prop() decorator
*/
- minDate: string;
+ minDate?: string;
/**
* Annotae with @Prop() decorator
*/
- maxDate: string;
+ maxDate?: string;
/**
* Annotate with @Prop({ attribute: 'i18n-done' }) decorator
diff --git a/packages/core/src/components/date-picker/date-picker.scss b/packages/core/src/components/date-picker/date-picker.scss
index 306655dbe82..cb3a7d20dbd 100644
--- a/packages/core/src/components/date-picker/date-picker.scss
+++ b/packages/core/src/components/date-picker/date-picker.scss
@@ -15,7 +15,7 @@
@include ix-component;
display: block;
position: relative;
- width: 22rem;
+ width: 21rem;
.header {
display: flex;
@@ -105,8 +105,9 @@
.grid {
display: grid;
- grid-template-columns: repeat(8, 40px);
+ grid-template-columns: 24px repeat(7, 40px);
grid-template-rows: repeat(7, 40px);
+
align-items: center;
justify-items: center;
justify-content: center;
@@ -123,9 +124,20 @@
height: 40px;
cursor: pointer;
+ &:first-child {
+ width: 24px;
+ }
+
&:focus-visible {
outline: 1px solid var(--theme-color-focus-bdr);
outline-offset: var(--theme-btn--focus--outline-offset);
+
+ background-color: var(--theme-datepicker-day--background--selected);
+ border: inset 1px solid var(--theme-datepicker-day--border-color--selected);
+ color: var(--theme-datepicker-day--color--selected);
+ font-size: 14px;
+ line-height: 20px;
+ letter-spacing: 0;
}
&.today {
@@ -144,23 +156,22 @@
&:hover {
background-color: var(
- --theme-datepicker-day--background--selected-hover
+ --theme-datepicker-day--background--selected-hover
);
}
&:active {
background-color: var(
- --theme-datepicker-day--background--selected-active
+ --theme-datepicker-day--background--selected-active
);
}
&.disabled {
pointer-events: none;
background-color: var(
- --theme-datepicker-day--background--selected-disabled
+ --theme-datepicker-day--background--selected-disabled
);
- border: 1px solid
- var(--theme-datepicker-day--background--selected-disabled);
+ border: 1px solid var(--theme-datepicker-day--background--selected-disabled);
color: var(--theme-datepicker-day--color--selected-disabled);
}
}
@@ -173,27 +184,24 @@
&:hover {
background-color: var(
- --theme-datepicker-day--background--range-hover
+ --theme-datepicker-day--background--range-hover
);
- border: 1px solid
- var(--theme-datepicker-today--border-color--range-hover);
+ border: 1px solid var(--theme-datepicker-today--border-color--range-hover);
}
&:active {
background-color: var(
- --theme-datepicker-day--background--range-active
+ --theme-datepicker-day--background--range-active
);
- border: 1px solid
- var(--theme-datepicker-today--border-color--range-active);
+ border: 1px solid var(--theme-datepicker-today--border-color--range-active);
}
&.disabled {
background-color: var(
- --theme-datepicker-day--background--range-disabled
+ --theme-datepicker-day--background--range-disabled
);
color: var(--theme-datepicker-day--color--range-disabled);
- border: 1px solid
- var(--theme-datepicker-today--border-color--range-disabled);
+ border: 1px solid var(--theme-datepicker-today--border-color--range-disabled);
}
}
@@ -220,20 +228,20 @@
&:hover {
background-color: var(
- --theme-datepicker-day--background--selected-hover
+ --theme-datepicker-day--background--selected-hover
);
}
&:active {
background-color: var(
- --theme-datepicker-day--background--selected-active
+ --theme-datepicker-day--background--selected-active
);
}
&.disabled {
pointer-events: none;
background-color: var(
- --theme-datepicker-day--background--selected-disabled
+ --theme-datepicker-day--background--selected-disabled
);
color: var(--theme-datepicker-day--color--selected-disabled);
}
@@ -245,20 +253,20 @@
&:hover {
background-color: var(
- --theme-datepicker-day--background--range-hover
+ --theme-datepicker-day--background--range-hover
);
}
&:active {
background-color: var(
- --theme-datepicker-day--background--range-active
+ --theme-datepicker-day--background--range-active
);
}
&.disabled {
pointer-events: none;
background-color: var(
- --theme-datepicker-day--background--range-disabled
+ --theme-datepicker-day--background--range-disabled
);
color: var(--theme-datepicker-day--color--range-disabled);
}
@@ -296,16 +304,7 @@
border: none;
background: none;
cursor: initial;
- }
-
- &:focus-visible {
- background-color: var(--theme-datepicker-day--background--selected);
- border: inset 1px solid
- var(--theme-datepicker-day--border-color--selected);
- color: var(--theme-datepicker-day--color--selected);
- font-size: 14px;
- line-height: 20px;
- letter-spacing: 0;
+ width: 1.5rem;
}
}
}
@@ -313,6 +312,7 @@
.button {
display: flex;
justify-content: flex-end;
+ margin-top: $default-space;
}
.hidden {
diff --git a/packages/core/src/components/date-picker/date-picker.tsx b/packages/core/src/components/date-picker/date-picker.tsx
index 0b3630a7173..e85985aac58 100644
--- a/packages/core/src/components/date-picker/date-picker.tsx
+++ b/packages/core/src/components/date-picker/date-picker.tsx
@@ -26,6 +26,11 @@ import { DateTime, Info } from 'luxon';
import { OnListener } from '../utils/listener';
import { IxDatePickerComponent } from './date-picker-component';
import { makeRef } from '../utils/make-ref';
+import {
+ iconChevronLeftSmall,
+ iconChevronRightSmall,
+ iconSingleCheck,
+} from '@siemens/ix-icons/icons';
export type DateChangeEvent = {
from: string;
@@ -146,6 +151,7 @@ export class DatePicker implements IxDatePickerComponent {
* @since 2.1.0
*/
@Prop() locale?: string;
+
@Watch('locale')
onLocaleChange() {
this.setTranslations();
@@ -675,7 +681,7 @@ export class DatePicker implements IxDatePickerComponent {
hidden: this.tempYear !== year,
arrowPosition: true,
}}
- name="chevron-right"
+ name={iconChevronRightSmall}
size="12"
>
{`${year}`}
@@ -697,7 +703,7 @@ export class DatePicker implements IxDatePickerComponent {
this.changeToAdjacentMonth(-1)}
ghost
- icon="chevron-left"
+ icon={iconChevronLeftSmall}
variant="primary"
class="arrows"
>
@@ -757,7 +763,7 @@ export class DatePicker implements IxDatePickerComponent {
this.tempMonth !== index,
checkPosition: true,
}}
- name="single-check"
+ name={iconSingleCheck}
size="16"
>
@@ -772,7 +778,7 @@ export class DatePicker implements IxDatePickerComponent {
this.changeToAdjacentMonth(1)}
ghost
- icon="chevron-right"
+ icon={iconChevronRightSmall}
variant="primary"
class="arrows"
>
diff --git a/packages/core/src/components/date-time-card/date-time-card.scss b/packages/core/src/components/date-time-card/date-time-card.scss
index 9189111adfa..910d38ab2d4 100644
--- a/packages/core/src/components/date-time-card/date-time-card.scss
+++ b/packages/core/src/components/date-time-card/date-time-card.scss
@@ -54,7 +54,7 @@
}
.content {
- padding: 0 $medium-space $medium-space $medium-space;
+ padding: 0 $default-space $default-space $default-space;
flex: 1 1 auto;
display: flex;
flex-direction: column;
diff --git a/packages/core/src/components/datetime-picker/datetime-picker.scss b/packages/core/src/components/datetime-picker/datetime-picker.scss
index a4d2fd01615..cc592c0ff46 100644
--- a/packages/core/src/components/datetime-picker/datetime-picker.scss
+++ b/packages/core/src/components/datetime-picker/datetime-picker.scss
@@ -19,11 +19,13 @@
position: relative;
width: min-content;
- .min-width {
- width: min-content;
+ .no-padding {
+ padding: 0;
}
- .no-padding {
+ ix-col {
+ display: flex;
+ flex-direction: column;
padding: 0;
}
@@ -36,10 +38,19 @@
@media (min-width: 576px) {
min-width: max-content;
- .btn-select-date {
- left: unset !important;
+ .btn-select-date-container {
+ display: inline-flex;
+ flex-grow: 1;
+
+ ix-button {
+ margin-left: auto;
+ margin-top: auto;
+ }
}
+ .min-width {
+ width: min-content;
+ }
}
.individual {
@@ -47,11 +58,13 @@
border: none;
}
- .btn-select-date {
- position: absolute;
- bottom: $default-space;
- right: $default-space;
- left: $default-space;
- }
+ .btn-select-date-container {
+ padding: 0 $default-space $default-space;
+ @media (max-width: 576px) {
+ & .btn-select-date {
+ width: 100%;
+ }
+ }
+ }
}
diff --git a/packages/core/src/components/datetime-picker/datetime-picker.tsx b/packages/core/src/components/datetime-picker/datetime-picker.tsx
index 3c71b684ad4..7f63d18f842 100644
--- a/packages/core/src/components/datetime-picker/datetime-picker.tsx
+++ b/packages/core/src/components/datetime-picker/datetime-picker.tsx
@@ -55,7 +55,7 @@ export class DatetimePicker
*
* @since 1.1.0
*/
- @Prop() minDate: string;
+ @Prop() minDate?: string;
/**
* The latest date that can be selected by the date picker.
@@ -63,7 +63,7 @@ export class DatetimePicker
*
* @since 1.1.0
*/
- @Prop() maxDate: string;
+ @Prop() maxDate?: string;
/**
* Date format string.
@@ -87,7 +87,7 @@ export class DatetimePicker
*
* @since 1.1.0
*/
- @Prop() from: string | undefined;
+ @Prop() from?: string;
/**
* The selected end date. If the the picker is not in range mode this property has no impact.
@@ -95,14 +95,14 @@ export class DatetimePicker
*
* @since 1.1.0
*/
- @Prop() to: string | undefined;
+ @Prop() to?: string;
/**
* Select time with format string
*
* @since 1.1.0
*/
- @Prop() time: string;
+ @Prop() time?: string;
/**
* Show time reference input
@@ -110,12 +110,12 @@ export class DatetimePicker
*
* @since 1.1.0
*/
- @Prop() showTimeReference = undefined;
+ @Prop() showTimeReference: boolean = false;
/**
* Set time reference
*/
- @Prop() timeReference: 'AM' | 'PM';
+ @Prop() timeReference?: 'AM' | 'PM';
/**
* Text of date select button
@@ -123,7 +123,7 @@ export class DatetimePicker
* @since 1.1.0
* @deprecated since 2.1.0. Use `i18nDone`
*/
- @Prop() textSelectDate: string;
+ @Prop() textSelectDate?: string;
/**
* Text of date select button
@@ -146,7 +146,7 @@ export class DatetimePicker
*
* @since 2.1.0
*/
- @Prop() locale: string = undefined;
+ @Prop() locale?: string;
/**
* Default behavior of the done event is to join the two events (date and time) into one combined string output.
@@ -163,43 +163,45 @@ export class DatetimePicker
* Set `doneEventDelimiter` to null or undefine to get the typed event
* @deprecated Use `this.dateChange`
*/
- @Event() done: EventEmitter
;
+ @Event() done!: EventEmitter;
/**
* Time change
*
* @since 1.1.0
*/
- @Event() timeChange: EventEmitter;
+ @Event() timeChange!: EventEmitter;
/**
* Date change
*
* @since 1.1.0
*/
- @Event() dateChange: EventEmitter;
+ @Event() dateChange!: EventEmitter;
/**
* Datetime selection event is fired after confirm button is pressed
*
* @since 1.1.0
*/
- @Event() dateSelect: EventEmitter;
+ @Event() dateSelect!: EventEmitter;
- private datePickerElement: HTMLIxDatePickerElement;
- private timePickerElement: HTMLIxTimePickerElement;
+ private datePickerElement?: HTMLIxDatePickerElement;
+ private timePickerElement?: HTMLIxTimePickerElement;
private async onDone() {
- const date = await this.datePickerElement.getCurrentDate();
- const time = await this.timePickerElement.getCurrentTime();
+ const date = await this.datePickerElement?.getCurrentDate();
+ const time = await this.timePickerElement?.getCurrentTime();
this.dateSelect.emit({
- from: date.from,
- to: date.to,
- time: time,
+ from: date?.from ?? '',
+ to: date?.to ?? '',
+ time: time ?? '',
});
- this.done.emit([date.from, date.to ?? '', time].join(this.eventDelimiter));
+ this.done.emit(
+ [date?.from, date?.to ?? '', time].join(this.eventDelimiter)
+ );
}
private async onDateChange(event: CustomEvent) {
@@ -223,7 +225,7 @@ export class DatetimePicker
-
+
(this.datePickerElement = ref)}
corners="left"
@@ -240,7 +242,7 @@ export class DatetimePicker
>
-
+
(this.timePickerElement = ref)}
@@ -252,16 +254,14 @@ export class DatetimePicker
format={this.timeFormat}
time={this.time}
>
-
-
-
-
- this.onDone()}
- >
- {this.textSelectDate || this.i18nDone}
-
+
+ this.onDone()}
+ >
+ {this.textSelectDate || this.i18nDone}
+
+
diff --git a/packages/core/src/components/time-picker/time-picker.scss b/packages/core/src/components/time-picker/time-picker.scss
index 78b1bccd570..a0b390cdd9d 100644
--- a/packages/core/src/components/time-picker/time-picker.scss
+++ b/packages/core/src/components/time-picker/time-picker.scss
@@ -17,11 +17,11 @@
display: block;
position: relative;
- width: 22rem;
+ width: 21rem;
@media (max-width: 576px) {
.clock {
- padding: 1.5rem 0;
+ padding: 1.5rem 0 1rem 0;
}
.header {
@@ -31,7 +31,7 @@
@media (min-width: 576px) {
.clock {
- padding: 4.25rem 0;
+ padding: 4.25rem 0 3.75rem 0;
}
.header {
@@ -97,6 +97,10 @@
.button {
display: flex;
justify-content: flex-end;
+
+ &.standalone {
+ padding-top: 0.5rem;
+ }
}
.default-space {
diff --git a/packages/core/src/components/time-picker/time-picker.tsx b/packages/core/src/components/time-picker/time-picker.tsx
index 58330a3011b..41544020bc0 100644
--- a/packages/core/src/components/time-picker/time-picker.tsx
+++ b/packages/core/src/components/time-picker/time-picker.tsx
@@ -20,6 +20,12 @@ import {
} from '@stencil/core';
import { DateTime } from 'luxon';
import { DateTimeCardCorners } from '../date-time-card/date-time-card';
+import {
+ iconChevronDown,
+ iconChevronDownSmall,
+ iconChevronUp,
+ iconChevronUpSmall,
+} from '@siemens/ix-icons/icons';
export type TimePickerCorners = DateTimeCardCorners;
@@ -126,22 +132,22 @@ export class TimePicker {
/**
* Time event
*/
- @Event() timeSelect: EventEmitter;
+ @Event() timeSelect!: EventEmitter;
/**
* Time event
* @deprecated Will be removed in 3.0.0. Use `time-select` event.
*/
- @Event() done: EventEmitter;
+ @Event() done!: EventEmitter;
/**
* Time change event
*/
- @Event() timeChange: EventEmitter;
+ @Event() timeChange!: EventEmitter;
- @State() private _time: DateTime;
- @State() private _timeRef: 'AM' | 'PM' | undefined;
- @State() private _formattedTime: TimeOutputFormat;
+ @State() private _time?: DateTime;
+ @State() private _timeRef?: 'AM' | 'PM';
+ @State() private _formattedTime?: TimeOutputFormat;
componentWillLoad() {
this._time = DateTime.fromFormat(this.time, this.format);
@@ -163,6 +169,10 @@ export class TimePicker {
@Watch('_time')
formatTime() {
+ if (!this._time) {
+ return;
+ }
+
const [hour, minute, second] = this._time
.toFormat(this.format)
.split(' ')[0]
@@ -177,8 +187,8 @@ export class TimePicker {
@Watch('_time')
onInternalTimeChange() {
- this.timeChange.emit(this._time.toFormat(this.format));
- if (this._timeRef) this._timeRef = this._time.toFormat('a') as 'AM' | 'PM';
+ this.timeChange.emit(this._time?.toFormat(this.format));
+ if (this._timeRef) this._timeRef = this._time?.toFormat('a') as 'AM' | 'PM';
}
timeUpdate(unit: 'hour' | 'minute' | 'second', value: number): number {
@@ -193,7 +203,7 @@ export class TimePicker {
value = 0;
}
- this._time = this._time.set({
+ this._time = this._time?.set({
[unit]: value,
});
return value;
@@ -202,8 +212,8 @@ export class TimePicker {
changeTimeReference() {
this._timeRef = this._timeRef === 'AM' ? 'PM' : 'AM';
- if (!this._time.toFormat('a').includes(this._timeRef)) {
- this._time = this._time.plus({
+ if (!this._time?.toFormat('a').includes(this._timeRef)) {
+ this._time = this._time?.plus({
hour: 12,
});
}
@@ -214,7 +224,7 @@ export class TimePicker {
*/
@Method()
async getCurrentTime() {
- return this._time.toFormat(this.format);
+ return this._time?.toFormat(this.format);
}
render() {
@@ -256,12 +266,12 @@ export class TimePicker {
- (this._time = this._time.plus({
+ (this._time = this._time?.plus({
[descriptor.unit]: 1,
}))
}
ghost
- icon="chevron-up"
+ icon={iconChevronUpSmall}
variant="primary"
class="arrows"
>
@@ -274,13 +284,13 @@ export class TimePicker {
value={
this._formattedTime
? this._formattedTime[descriptor.unit]
- : null
+ : ''
}
onKeyDown={(e) => {
if (e.key !== 'ArrowUp' && e.key !== 'ArrowDown') return;
const value = e.key === 'ArrowUp' ? 1 : -1;
- this._time = this._time.plus({
+ this._time = this._time?.plus({
[descriptor.unit]: value,
});
e.preventDefault();
@@ -297,12 +307,12 @@ export class TimePicker {
- (this._time = this._time.minus({
+ (this._time = this._time?.minus({
[descriptor.unit]: 1,
}))
}
ghost
- icon="chevron-down"
+ icon={iconChevronDownSmall}
variant="primary"
class="arrows"
>
@@ -332,7 +342,7 @@ export class TimePicker {
size="16"
onClick={() => this.changeTimeReference()}
ghost
- icon="chevron-up"
+ icon={iconChevronUp}
variant="primary"
class="arrows"
>
@@ -341,17 +351,23 @@ export class TimePicker {
size="16"
onClick={() => this.changeTimeReference()}
ghost
- icon="chevron-down"
+ icon={iconChevronDown}
variant="primary"
class="arrows"
>
-
+
{
- this.timeSelect.emit(this._time.toFormat(this.format));
- this.done.emit(this._time.toFormat(this.format));
+ this.timeSelect.emit(this._time?.toFormat(this.format));
+ this.done.emit(this._time?.toFormat(this.format));
}}
>
{this.textSelectTime}
diff --git a/packages/core/src/tests/date-dropdown/date-dropdown.e2e.ts-snapshots/date-dropdown-basic-1-chromium---theme-classic-dark-linux.png b/packages/core/src/tests/date-dropdown/date-dropdown.e2e.ts-snapshots/date-dropdown-basic-1-chromium---theme-classic-dark-linux.png
index 4e00ecaa9f5..81f26dbb5ec 100644
Binary files a/packages/core/src/tests/date-dropdown/date-dropdown.e2e.ts-snapshots/date-dropdown-basic-1-chromium---theme-classic-dark-linux.png and b/packages/core/src/tests/date-dropdown/date-dropdown.e2e.ts-snapshots/date-dropdown-basic-1-chromium---theme-classic-dark-linux.png differ
diff --git a/packages/core/src/tests/date-dropdown/date-dropdown.e2e.ts-snapshots/date-dropdown-basic-1-chromium---theme-classic-light-linux.png b/packages/core/src/tests/date-dropdown/date-dropdown.e2e.ts-snapshots/date-dropdown-basic-1-chromium---theme-classic-light-linux.png
index 4ec97b767c1..557b7b30741 100644
Binary files a/packages/core/src/tests/date-dropdown/date-dropdown.e2e.ts-snapshots/date-dropdown-basic-1-chromium---theme-classic-light-linux.png and b/packages/core/src/tests/date-dropdown/date-dropdown.e2e.ts-snapshots/date-dropdown-basic-1-chromium---theme-classic-light-linux.png differ
diff --git a/packages/core/src/tests/date-dropdown/date-dropdown.e2e.ts-snapshots/date-dropdown-range-options---custom-1-chromium---theme-classic-dark-linux.png b/packages/core/src/tests/date-dropdown/date-dropdown.e2e.ts-snapshots/date-dropdown-range-options---custom-1-chromium---theme-classic-dark-linux.png
index 81ab9cbb81a..a6ce1e87bc3 100644
Binary files a/packages/core/src/tests/date-dropdown/date-dropdown.e2e.ts-snapshots/date-dropdown-range-options---custom-1-chromium---theme-classic-dark-linux.png and b/packages/core/src/tests/date-dropdown/date-dropdown.e2e.ts-snapshots/date-dropdown-range-options---custom-1-chromium---theme-classic-dark-linux.png differ
diff --git a/packages/core/src/tests/date-dropdown/date-dropdown.e2e.ts-snapshots/date-dropdown-range-options---custom-1-chromium---theme-classic-light-linux.png b/packages/core/src/tests/date-dropdown/date-dropdown.e2e.ts-snapshots/date-dropdown-range-options---custom-1-chromium---theme-classic-light-linux.png
index d0889205d83..066626f9fd3 100644
Binary files a/packages/core/src/tests/date-dropdown/date-dropdown.e2e.ts-snapshots/date-dropdown-range-options---custom-1-chromium---theme-classic-light-linux.png and b/packages/core/src/tests/date-dropdown/date-dropdown.e2e.ts-snapshots/date-dropdown-range-options---custom-1-chromium---theme-classic-light-linux.png differ
diff --git a/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-basic-1-chromium---theme-classic-dark-linux.png b/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-basic-1-chromium---theme-classic-dark-linux.png
index b54b1d1eb09..36f741d08ad 100644
Binary files a/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-basic-1-chromium---theme-classic-dark-linux.png and b/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-basic-1-chromium---theme-classic-dark-linux.png differ
diff --git a/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-basic-1-chromium---theme-classic-light-linux.png b/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-basic-1-chromium---theme-classic-light-linux.png
index d5286706022..de606c761d3 100644
Binary files a/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-basic-1-chromium---theme-classic-light-linux.png and b/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-basic-1-chromium---theme-classic-light-linux.png differ
diff --git a/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-range-1-chromium---theme-classic-dark-linux.png b/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-range-1-chromium---theme-classic-dark-linux.png
index 1a77e57ea5b..5133a584cdd 100644
Binary files a/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-range-1-chromium---theme-classic-dark-linux.png and b/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-range-1-chromium---theme-classic-dark-linux.png differ
diff --git a/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-range-1-chromium---theme-classic-light-linux.png b/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-range-1-chromium---theme-classic-light-linux.png
index 3133aa40547..d32ad561dee 100644
Binary files a/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-range-1-chromium---theme-classic-light-linux.png and b/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-range-1-chromium---theme-classic-light-linux.png differ
diff --git a/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-week-start-1-chromium---theme-classic-dark-linux.png b/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-week-start-1-chromium---theme-classic-dark-linux.png
index 1bf88ec9867..4d4fa5f7652 100644
Binary files a/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-week-start-1-chromium---theme-classic-dark-linux.png and b/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-week-start-1-chromium---theme-classic-dark-linux.png differ
diff --git a/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-week-start-1-chromium---theme-classic-light-linux.png b/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-week-start-1-chromium---theme-classic-light-linux.png
index effeca50c7d..797506ec984 100644
Binary files a/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-week-start-1-chromium---theme-classic-light-linux.png and b/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-week-start-1-chromium---theme-classic-light-linux.png differ
diff --git a/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-year-month-selection-1-chromium---theme-classic-dark-linux.png b/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-year-month-selection-1-chromium---theme-classic-dark-linux.png
index 4eebcc0b7ea..fc144a27458 100644
Binary files a/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-year-month-selection-1-chromium---theme-classic-dark-linux.png and b/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-year-month-selection-1-chromium---theme-classic-dark-linux.png differ
diff --git a/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-year-month-selection-1-chromium---theme-classic-light-linux.png b/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-year-month-selection-1-chromium---theme-classic-light-linux.png
index 1fbaf4a3869..166b3356d2c 100644
Binary files a/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-year-month-selection-1-chromium---theme-classic-light-linux.png and b/packages/core/src/tests/date-picker-rework/date-picker-rework.e2e.ts-snapshots/date-picker-year-month-selection-1-chromium---theme-classic-light-linux.png differ
diff --git a/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-basic-1-chromium---theme-classic-dark-linux.png b/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-basic-1-chromium---theme-classic-dark-linux.png
index b54b1d1eb09..36f741d08ad 100644
Binary files a/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-basic-1-chromium---theme-classic-dark-linux.png and b/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-basic-1-chromium---theme-classic-dark-linux.png differ
diff --git a/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-basic-1-chromium---theme-classic-light-linux.png b/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-basic-1-chromium---theme-classic-light-linux.png
index d5286706022..de606c761d3 100644
Binary files a/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-basic-1-chromium---theme-classic-light-linux.png and b/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-basic-1-chromium---theme-classic-light-linux.png differ
diff --git a/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-locales-1-chromium---theme-classic-dark-linux.png b/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-locales-1-chromium---theme-classic-dark-linux.png
index 6bcd5de2f07..d5e0ac55e8c 100644
Binary files a/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-locales-1-chromium---theme-classic-dark-linux.png and b/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-locales-1-chromium---theme-classic-dark-linux.png differ
diff --git a/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-locales-1-chromium---theme-classic-light-linux.png b/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-locales-1-chromium---theme-classic-light-linux.png
index 9e51e94c957..c04d9f69100 100644
Binary files a/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-locales-1-chromium---theme-classic-light-linux.png and b/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-locales-1-chromium---theme-classic-light-linux.png differ
diff --git a/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-range-1-chromium---theme-classic-dark-linux.png b/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-range-1-chromium---theme-classic-dark-linux.png
index 1a77e57ea5b..5133a584cdd 100644
Binary files a/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-range-1-chromium---theme-classic-dark-linux.png and b/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-range-1-chromium---theme-classic-dark-linux.png differ
diff --git a/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-range-1-chromium---theme-classic-light-linux.png b/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-range-1-chromium---theme-classic-light-linux.png
index 3133aa40547..d32ad561dee 100644
Binary files a/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-range-1-chromium---theme-classic-light-linux.png and b/packages/core/src/tests/date-picker/date-picker.e2e.ts-snapshots/date-picker-range-1-chromium---theme-classic-light-linux.png differ
diff --git a/packages/core/src/tests/datetime-picker-rework/datetime-picker-rework.e2e.ts-snapshots/datetime-picker-basic-1-chromium---theme-classic-dark-linux.png b/packages/core/src/tests/datetime-picker-rework/datetime-picker-rework.e2e.ts-snapshots/datetime-picker-basic-1-chromium---theme-classic-dark-linux.png
index eedd627041b..599ef3f8eec 100644
Binary files a/packages/core/src/tests/datetime-picker-rework/datetime-picker-rework.e2e.ts-snapshots/datetime-picker-basic-1-chromium---theme-classic-dark-linux.png and b/packages/core/src/tests/datetime-picker-rework/datetime-picker-rework.e2e.ts-snapshots/datetime-picker-basic-1-chromium---theme-classic-dark-linux.png differ
diff --git a/packages/core/src/tests/datetime-picker-rework/datetime-picker-rework.e2e.ts-snapshots/datetime-picker-basic-1-chromium---theme-classic-light-linux.png b/packages/core/src/tests/datetime-picker-rework/datetime-picker-rework.e2e.ts-snapshots/datetime-picker-basic-1-chromium---theme-classic-light-linux.png
index 0fa1f3db0ae..0b473021cf9 100644
Binary files a/packages/core/src/tests/datetime-picker-rework/datetime-picker-rework.e2e.ts-snapshots/datetime-picker-basic-1-chromium---theme-classic-light-linux.png and b/packages/core/src/tests/datetime-picker-rework/datetime-picker-rework.e2e.ts-snapshots/datetime-picker-basic-1-chromium---theme-classic-light-linux.png differ
diff --git a/packages/core/src/tests/datetime-picker/datetime-picker.e2e.ts b/packages/core/src/tests/datetime-picker/datetime-picker.e2e.ts
index 4e18659d5fc..dd30ddac8de 100644
--- a/packages/core/src/tests/datetime-picker/datetime-picker.e2e.ts
+++ b/packages/core/src/tests/datetime-picker/datetime-picker.e2e.ts
@@ -8,7 +8,7 @@
*/
import { expect } from '@playwright/test';
-import { regressionTest } from '@utils/test';
+import { regressionTest, viewPorts } from '@utils/test';
regressionTest.describe('datetime picker', () => {
regressionTest('basic', async ({ page }) => {
@@ -17,4 +17,12 @@ regressionTest.describe('datetime picker', () => {
maxDiffPixels: 5,
});
});
+
+ regressionTest('mobile', async ({ page }) => {
+ await page.setViewportSize(viewPorts.sm);
+ await page.goto('datetime-picker/basic');
+ expect(await page.screenshot({ fullPage: true })).toMatchSnapshot({
+ maxDiffPixels: 5,
+ });
+ });
});
diff --git a/packages/core/src/tests/datetime-picker/datetime-picker.e2e.ts-snapshots/datetime-picker-basic-1-chromium---theme-classic-dark-linux.png b/packages/core/src/tests/datetime-picker/datetime-picker.e2e.ts-snapshots/datetime-picker-basic-1-chromium---theme-classic-dark-linux.png
index 3b6010e760d..b888db09a85 100644
Binary files a/packages/core/src/tests/datetime-picker/datetime-picker.e2e.ts-snapshots/datetime-picker-basic-1-chromium---theme-classic-dark-linux.png and b/packages/core/src/tests/datetime-picker/datetime-picker.e2e.ts-snapshots/datetime-picker-basic-1-chromium---theme-classic-dark-linux.png differ
diff --git a/packages/core/src/tests/datetime-picker/datetime-picker.e2e.ts-snapshots/datetime-picker-basic-1-chromium---theme-classic-light-linux.png b/packages/core/src/tests/datetime-picker/datetime-picker.e2e.ts-snapshots/datetime-picker-basic-1-chromium---theme-classic-light-linux.png
index 06c0527fd19..8662c107bb7 100644
Binary files a/packages/core/src/tests/datetime-picker/datetime-picker.e2e.ts-snapshots/datetime-picker-basic-1-chromium---theme-classic-light-linux.png and b/packages/core/src/tests/datetime-picker/datetime-picker.e2e.ts-snapshots/datetime-picker-basic-1-chromium---theme-classic-light-linux.png differ
diff --git a/packages/core/src/tests/datetime-picker/datetime-picker.e2e.ts-snapshots/datetime-picker-mobile-1-chromium---theme-classic-dark-linux.png b/packages/core/src/tests/datetime-picker/datetime-picker.e2e.ts-snapshots/datetime-picker-mobile-1-chromium---theme-classic-dark-linux.png
new file mode 100644
index 00000000000..c97e4a4fa00
Binary files /dev/null and b/packages/core/src/tests/datetime-picker/datetime-picker.e2e.ts-snapshots/datetime-picker-mobile-1-chromium---theme-classic-dark-linux.png differ
diff --git a/packages/core/src/tests/datetime-picker/datetime-picker.e2e.ts-snapshots/datetime-picker-mobile-1-chromium---theme-classic-light-linux.png b/packages/core/src/tests/datetime-picker/datetime-picker.e2e.ts-snapshots/datetime-picker-mobile-1-chromium---theme-classic-light-linux.png
new file mode 100644
index 00000000000..0e6cdf018ce
Binary files /dev/null and b/packages/core/src/tests/datetime-picker/datetime-picker.e2e.ts-snapshots/datetime-picker-mobile-1-chromium---theme-classic-light-linux.png differ
diff --git a/packages/core/src/tests/time-picker-rework/time-picker-rework.e2e.ts-snapshots/time-picker-basic-1-chromium---theme-classic-dark-linux.png b/packages/core/src/tests/time-picker-rework/time-picker-rework.e2e.ts-snapshots/time-picker-basic-1-chromium---theme-classic-dark-linux.png
index ddf615be395..c319288eb33 100644
Binary files a/packages/core/src/tests/time-picker-rework/time-picker-rework.e2e.ts-snapshots/time-picker-basic-1-chromium---theme-classic-dark-linux.png and b/packages/core/src/tests/time-picker-rework/time-picker-rework.e2e.ts-snapshots/time-picker-basic-1-chromium---theme-classic-dark-linux.png differ
diff --git a/packages/core/src/tests/time-picker-rework/time-picker-rework.e2e.ts-snapshots/time-picker-basic-1-chromium---theme-classic-light-linux.png b/packages/core/src/tests/time-picker-rework/time-picker-rework.e2e.ts-snapshots/time-picker-basic-1-chromium---theme-classic-light-linux.png
index 31863ef4e79..d8d5607b361 100644
Binary files a/packages/core/src/tests/time-picker-rework/time-picker-rework.e2e.ts-snapshots/time-picker-basic-1-chromium---theme-classic-light-linux.png and b/packages/core/src/tests/time-picker-rework/time-picker-rework.e2e.ts-snapshots/time-picker-basic-1-chromium---theme-classic-light-linux.png differ