Wrong date with yy.mm.dd date format

UI Components for Vue
Post Reply
rosenb
Posts: 4
Joined: 16 Aug 2019, 07:50

18 Aug 2019, 08:29

Typing date with dateFormat="yy.mm.dd" gives wrong date, in day section automatically inserts leading zero and cannot be typed e.q. "23" to day, it forces "02" when "2" is pressed. And without specifying dateFormat in the component it gives date in default format, however it's set in "hu" locale.
// hungarian special chars cause mysql error when saving topic, so replaced with "..."

Component:
Calendar v-model="myDate" :showIcon="true" :locale="hu" :showOnFocus="false" dateFormat="yy.mm.dd"

function returns "hu" data:
return {
firstDayOfWeek: 1,
dayNames: [...],
dayNamesShort: [...],
dayNamesMin: [...],
monthNames: [ ...],
monthNamesShort: [...],
today: '...',
clear: '...',
dateFormat: 'yy.mm.dd',
weekHeader: 'Wk'
}

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

21 Aug 2019, 14:18

Isn't this expected, from the docs;

y - year (two digit)
yy - year (four digit)

So double y means four digits so zeros are added.

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 4 guests