discourse/app/assets/stylesheets/common/form-kit/_control-calendar.scss
Joffrey JAFFEUX 3d515b9dd8
DEV: calendar control for form-kit (#31506)
This commit introduces a new `Calendar` control for form-kit. This
control will render a date picker and a time input. On mobile the date
picker will be replaced by a native input of type date.

The following validation options have also been added:
- `dateAfterOrEqual`
- `dateBeforeOrEqual`

The control has two options:

- `includeTime` - show or hide the time input (default true)
- `expandedDatePickerOnDesktop` - show an expanded datepicker on
desktop, or not (default true)
2025-02-26 11:23:07 +01:00

77 lines
1.3 KiB
SCSS
Vendored

.form-kit__control-calendar-menu-trigger {
justify-content: flex-start;
width: 100%;
}
.form-kit__field-calendar {
width: 100%;
.date-picker-container {
border: 1px solid var(--primary-low-mid);
box-sizing: border-box;
border-radius: var(--d-border-radius);
}
}
.form-kit__control-calendar {
display: flex;
flex-direction: row;
.date-picker {
display: none;
}
}
.form-kit__control-calendar + .date-picker-container {
width: 100%;
.pika-single {
position: relative !important;
border: none;
border-radius: 0;
width: 100%;
box-sizing: border-box;
.pika-button {
border-radius: 0;
text-align: center;
}
.is-selected {
.pika-button {
box-shadow: none;
}
}
.pika-lendar {
padding: 0;
box-sizing: border-box;
margin: 0;
width: 100%;
}
.pika-table {
margin-top: 0 !important; // core style was leaking on this
}
.pika-row:last-child {
border-bottom: none !important; // core style was leaking on this
}
.pika-row:hover {
background: none !important; // core style was leaking on this
}
}
}
.form-kit__control-calendar-menu-content {
.fk-d-menu__inner-content {
display: flex;
flex-direction: column;
padding: 0.5em;
}
.date-picker-container {
padding-bottom: 1em;
}
}