Skip to content

Commit

Permalink
Update era and month fields more reliably
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 committed Dec 13, 2023
1 parent ab49980 commit 0671357
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions modules/ui/fields/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ export function uiFieldDate(field, context) {
.on('change', change)
.on('blur', change);
eraInput
.on('blur', change)
.on('change', change);
.on('change', change)
.on('blur', change);
monthInput
.on('blur', change)
.on('change', change);
.on('change', change)
.on('blur', change);
dayInput
.on('change', change)
.on('blur', change);
Expand Down Expand Up @@ -244,9 +244,9 @@ export function uiFieldDate(field, context) {
.attr('title', isMixed ? yearValue.filter(Boolean).join('\n') : null)
.attr('placeholder', isMixed ? t('inspector.multiple_values') : t('inspector.date.year'))
.classed('mixed', isMixed);
utilGetSetValue(eraInput, eraValue)
utilGetSetValue(eraInput, typeof eraValue === 'string' ? eraValue : '')
.attr('placeholder', t('inspector.date.era'));
utilGetSetValue(monthInput, monthValue)
utilGetSetValue(monthInput, typeof monthValue === 'string' ? monthValue : '')
.attr('placeholder', t('inspector.date.month'));
utilGetSetValue(dayInput, typeof dayValue === 'number' ? dayValue : '')
.attr('placeholder', t('inspector.date.day'));
Expand Down

0 comments on commit 0671357

Please sign in to comment.