Add year select fallback for Firefox
This commit is contained in:
parent
6d5ad656b6
commit
b41ee62e59
|
@ -66,16 +66,24 @@ html {
|
|||
right: 0;
|
||||
|
||||
opacity: 0;
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.fallback-input-month .CalendarView_heading_monthInput {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* The little calendar icon button in the input that opens the date picker.
|
||||
* We're stretching this out over the heading */
|
||||
.CalendarView_heading_monthInput::-webkit-calendar-picker-indicator {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin-left: 0;
|
||||
|
||||
background-color: #f00;
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.CalendarView_heading_yearSelectFallback {
|
||||
|
@ -91,6 +99,8 @@ html {
|
|||
height: 100%;
|
||||
|
||||
opacity: 0;
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.fallback-input-month .CalendarView_heading_yearSelectFallback {
|
||||
|
|
|
@ -258,15 +258,15 @@ async function mountHydrogen() {
|
|||
}
|
||||
|
||||
onMonthInputChange(e) {
|
||||
const selectedDate = new Date(e.target.valueAsDate);
|
||||
console.log('onMonthInputChange selectedDate', selectedDate, e.target.valueAsDate);
|
||||
this._calendarDate = selectedDate;
|
||||
this._calendarDate = e.target.valueAsDate;
|
||||
this.emitChange('calendarDate');
|
||||
}
|
||||
|
||||
onYearFallbackSelectChange(e) {
|
||||
// TODO
|
||||
console.log('onYearFallbackSelectChange', e);
|
||||
const selectedDate = new Date(this._calendarDate);
|
||||
selectedDate.setUTCFullYear(e.target.value);
|
||||
this._calendarDate = selectedDate;
|
||||
this.emitChange('calendarDate');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue