Studio Centro srl
Studio Centro srl

Reputation: 13

ExtJS timefield 24 hour format picker

I'm using ExtJS 7.3.1 (modern) and I have a problem with the timefield picker. I can't find a solution to let the user choose directly in the 24hour format without switch between AM and PM option ... is it possible? In the visualization no problem, because there is the format property ('H:i').

Upvotes: 1

Views: 464

Answers (1)

scebotari66
scebotari66

Reputation: 3480

For this, you would have to set the meridiem config of the picker to false:

{
    xtype: 'timefield',
    label: 'Birthday',
    format: 'H:i',
    picker: {
        meridiem: false
    }
}

enter image description here

Also note, there is alignPMInside config (also on the picker), that when set to true, will align the hours in two circles:

{
    xtype: 'timefield',
    label: 'Birthday',
    format: 'H:i',
    picker: {
        meridiem: false,
        alignPMInside: true
    }
}

enter image description here

Upvotes: 1

Related Questions