From 1a605524174666bd6364d92c8706038eeb6cd9d8 Mon Sep 17 00:00:00 2001 From: Nikhil Nagdev Date: Mon, 23 Dec 2019 00:51:31 +0530 Subject: [PATCH] Changed default time of datetime picker as current time Signed-off-by: Nikhil Nagdev --- js/functions.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/functions.js b/js/functions.js index 88263b60ff..de2cd8fe61 100644 --- a/js/functions.js +++ b/js/functions.js @@ -98,7 +98,13 @@ function PMA_addDatepicker ($this_element, type, options) { showTimepicker = false; } + // Getting the current Date and time + var currentDateTime = new Date(); + var defaultOptions = { + hour: currentDateTime.getHours(), + minute: currentDateTime.getMinutes(), + second: currentDateTime.getSeconds(), showOn: 'button', buttonImage: themeCalendarImage, // defined in js/messages.php buttonImageOnly: true,