datetimepicker
datetimepicker copied to clipboard
Use DateTimePicker with only time picker in 24 hours format
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:
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?
I think you could just change the formatTime
setting in your settings to formatTime: 'g:i A'
. That worked for me.