(function ($) { $.extend($.ui, { DateTimepicker: {} }); $.datepicker._base_updateDatepicker = $.datepicker._updateDatepicker; $.datepicker._updateDatepicker = function (inst) { $.datepicker._base_updateDatepicker(inst); var val = inst.input.val(); if (inst.input.hasClass("datetimepicker") == false) return; var bottomLayer = $(".ui-datepicker").append("
"); bottomLayer.append(html1); bottomLayer.append("시 "); bottomLayer.append(html2); bottomLayer.append("분 "); bottomLayer.append(html3); bottomLayer.append("초 "); $.datetimepicker.setTime(val, inst.input); }; function DateTimePicker(options) { this.defaultDateTimePicker = { showTimePicker: false, time_format: 'hh:mm:ss' }; hourHTML = $(""); minutsHTML = $(""); secondHTML = $(""); for (i = 1; i <= 24; i++) html1 = hourHTML.append("" + i + "" + i + " 1) { var strTime = arrStr[1]; var arr = strTime.split(':'); if (arr.length > 0) { hour = arr[0]; if (arr.length > 1) minuts = arr[1]; if (arr.length > 2) second = arr[2]; } } $('.ui-datepicker .dateimepicker-hour').val(hour); $('.ui-datepicker .dateimepicker-minuts').val(minuts); $('.ui-datepicker .dateimepicker-second').val(second); } }; $.datetimepicker = new DateTimePicker(); $.datetimepicker._initTimePicker(); } (jQuery));