[q-input with q-date] I want date model as 'yyyy/mm/dd' but want to display as 'dd/mm/yyyy' in input box.
-
-
Then you’ll need to transform the model between QDate and QInput yourself, as neither know what the day, month or year is.
Scott
-
@s-molinari
Do you mean that I need two date string?date: '2020/01/02', dateToDisplay: '02/01/2020'
and use a transform function to convert each other
this.dateDisplay = this.date.split('/').reverse().join('/') this.date= this.dateDisplay.split('/').reverse().join('/')
-
Sorry, QDate can create formatted dates using the mask prop. But, if you need to reformat it for persistence purposes, then yeah. Something like that.
Scott