Qt quick : How to set calendar selectedDate in short format
-
i'am using Calendar qml type to set date but i can not get selectedData as mm.dd.yyyy.
it shows the result as this with time : 12.12.2023 12:00:00 2023 GMT+0300this is the code:
Calendar{ id: calendar navigationBarVisible: true minimumDate: new Date() onPressed: { timeInput = calendar.selectedDate console.log(calendar.selectedDate) } }
How can i get the short format ?
-
i'am using Calendar qml type to set date but i can not get selectedData as mm.dd.yyyy.
it shows the result as this with time : 12.12.2023 12:00:00 2023 GMT+0300this is the code:
Calendar{ id: calendar navigationBarVisible: true minimumDate: new Date() onPressed: { timeInput = calendar.selectedDate console.log(calendar.selectedDate) } }
How can i get the short format ?
@Mohamad-Ayrot take a look at Qt.formatDate
https://doc.qt.io/qt-6/qml-qtqml-qt.html#formatDate-method -
Thank You