Make date picker aware of the birthday max value

このコミットが含まれているのは:
tusooa 2023-01-22 11:22:24 -05:00
コミット 03d5c2e140
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: 7B467EDE43A08224
2個のファイルの変更4行の追加1行の削除

ファイルの表示

@ -71,6 +71,9 @@ const registration = {
minDate.setTime(today.getTime() - minAge * DAY)
return minDate
},
birthdayMinAttr () {
return this.birthdayMin.toJSON().replace(/T.+$/, '')
},
birthdayMinFormatted () {
const browserLocale = localeService.internalToBrowserLocale(this.$i18n.locale)
return this.user.birthday && new Date(Date.parse(this.birthdayMin)).toLocaleDateString(browserLocale, { timeZone: 'UTC', day: 'numeric', month: 'long', year: 'numeric' })

ファイルの表示

@ -183,7 +183,7 @@
:disabled="isPending"
class="form-control"
type="date"
max="birthdayMin"
:max="birthdayRequired ? birthdayMinAttr : undefined"
:aria-required="birthdayRequired"
>
</div>