Important: Please read the Qt Code of Conduct -

Can not change firstDayOfWeek of calendar in qml

  • In Calendar qml doc i do not see any property to change the firstDayOfWeek. So i look into calendar.qml source code and i saw a property __locale

        The locale that this calendar should use to display itself.
        Affects how dates and day names are localized, as well as which
        day is considered the first in a week.
        To set an Australian locale, for example:
        locale: Qt.locale("en_AU")
        The default locale is \c Qt.locale().
    property var __locale: Qt.locale()

    An object created by Qt.locale() will have a property firstDayOfWeek

    I want to change the first day of week of a calendar so i set

    Calendar {
        id: cal
        Component.onCompleted: {
            cal.__locale.firstDayOfWeek = Locale.Tuesday;

    But the firstDayOfWeek do not change
    Can anyone tell me what did i do wrong ?
    Is there any other ways to change the firstDayOfWeek of calendar in qml ?

Log in to reply