// Wrapper for the jquery datetimepicker widget.
// http://xdsoft.net/jqplugins/datetimepicker/
FW_widgets['datetime'] = { createFn:FW_datetimeCreate, };
function
FW_datetimeCreate(elName, devName, vArr, currVal, set, params, cmd)
{
if(!vArr.length || vArr[0] != "datetime" || (params && params.length))
return undefined;
var widgetId = "datetimepicker-"+devName+"-"+set;
var newEl = $("
").get(0);
$(newEl).append('');
var inp = $(newEl).find("input");
if(elName)
$(inp).attr("name", elName);
if(currVal != undefined)
$(inp).val(currVal);
function addBlur() { if(cmd) $(inp).blur(function() { cmd($(inp).val()) }); };
newEl.setValueFn = function(arg){ $(inp).val(arg) };
addBlur();
var options = {
lang:'de',
i18n:{
de:{
months:[
"Januar","Februar","März","April",
"Mai","Juni","Juli","August",
"September","Oktober","November","Dezember",
],
dayOfWeek:[
"So.", "Mo", "Di", "Mi",
"Do", "Fr", "Sa.",
]
}
},
theme:"dark",
format:"d.m.Y H:i",
onClose: function(current_time,$input){
console.log("set data");
$("#"+widgetId).blur();
;}
};
for(var i1=0; i1