Theme Template: Adjust datetime picker to support setting seconds on Contact Time Add/Edit.

This commit is contained in:
Nate 2019-07-26 10:30:56 -06:00
parent faca29d5bc
commit af83df2766
2 changed files with 9 additions and 3 deletions

View File

@ -194,7 +194,7 @@ else {
echo " ".$text['label-time_start']."\n";
echo "</td>\n";
echo "<td width='70%' class='vtable' style='position: relative;' align='left'>\n";
echo " <input class='formfld datetimepicker' type='text' name='time_start' id='time_start' style='min-width: 135px; width: 135px;' value='".escape($time_start)."'>\n";
echo " <input class='formfld datetimesecondspicker' type='text' name='time_start' id='time_start' style='min-width: 135px; width: 135px;' value='".escape($time_start)."'>\n";
echo "</td>\n";
echo "</tr>\n";
@ -203,7 +203,7 @@ else {
echo " ".$text['label-time_stop']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <input class='formfld datetimepicker' type='text' name='time_stop' id='time_stop' style='min-width: 135px; width: 135px;' value='".escape($time_stop)."'>\n";
echo " <input class='formfld datetimesecondspicker' type='text' name='time_stop' id='time_stop' style='min-width: 135px; width: 135px;' value='".escape($time_stop)."'>\n";
echo "</td>\n";
echo "</tr>\n";

View File

@ -210,7 +210,7 @@ echo "<script language='JavaScript' type='text/javascript' src='<!--{project_pat
});
//apply the auto-size jquery script to all text inputs
$("input[type=text].txt,input[type=number].txt,input[type=password].txt,input[type=text].formfld,input[type=number].formfld,input[type=password].formfld").not('.datetimepicker,.datepicker').autosizeInput();
$("input[type=text].txt,input[type=number].txt,input[type=password].txt,input[type=text].formfld,input[type=number].formfld,input[type=password].formfld").not('.datetimepicker,.datetimesecondspicker,.datepicker').autosizeInput();
//apply bootstrap-datetime plugin
$(function() {
@ -220,6 +220,12 @@ echo "<script language='JavaScript' type='text/javascript' src='<!--{project_pat
showClear: true,
showClose: true,
});
$('.datetimesecondspicker').datetimepicker({
format: 'YYYY-MM-DD HH:mm:ss',
showTodayButton: true,
showClear: true,
showClose: true,
});
$('.datepicker').datetimepicker({
format: 'YYYY-MM-DD',
showTodayButton: true,