Fixed time selection for TIME type (#13093)
TIME type in MySql supports a long range of values. The PMA insert widget don't allow the values greater than 23 currently. So, it is corrected by setting the timepicker function have a greater hourMax value than it have by default. Fixes #12948 Signed-off-by: Mohammad Luqman <me@mohdluqman.com>
This commit is contained in:
parent
153fefb52b
commit
32af52a858
@ -171,6 +171,7 @@ function addDateTimePicker() {
|
||||
var showMillisec = false;
|
||||
var showMicrosec = false;
|
||||
var timeFormat = 'HH:mm:ss';
|
||||
var hourMax = 23;
|
||||
// check for decimal places of seconds
|
||||
if (decimals > 0 && type.indexOf('time') != -1){
|
||||
if (decimals > 3) {
|
||||
@ -182,12 +183,15 @@ function addDateTimePicker() {
|
||||
timeFormat = 'HH:mm:ss.l';
|
||||
}
|
||||
}
|
||||
if (type == 'time'){
|
||||
hourMax = 99;
|
||||
}
|
||||
PMA_addDatepicker($(this), type, {
|
||||
showMillisec: showMillisec,
|
||||
showMicrosec: showMicrosec,
|
||||
timeFormat: timeFormat
|
||||
timeFormat: timeFormat,
|
||||
hourMax: hourMax
|
||||
});
|
||||
|
||||
// Add a tip regarding entering MySQL allowed-values
|
||||
// for TIME and DATE data-type
|
||||
if ($(this).hasClass('timefield')) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user