xdan / datetimepicker

jQuery Plugin Date and Time Picker
https://xdsoft.net/jqplugins/datetimepicker/
MIT License
3.5k stars 1.52k forks source link

Use DateTimePicker with only time picker in 24 hours format #744

Open saadsaeed01 opened 4 years ago

saadsaeed01 commented 4 years ago

Hello

I am using date time picker with only time picker option in Blazor. My code is given below:

$('#' + id).datetimepicker({ pickDate: false, pickSeconds: false, pick12HourFormat: false, minuteStep: 1, pickerPosition: 'bottom-right', container: '#' + modal, format: 'hh:ii', autoclose: true, showMeridian: true, startView: 1, maxView: 1, }) On UI it is looking like this: image Questions -How can I force the picker to show time in 24 hours format instead of AM and PM? -Also what to do If I don't want to show date?

AmmonQ commented 2 years ago

I think you could just change the formatTime setting in your settings to formatTime: 'g:i A'. That worked for me.