﻿function setday(inputObj, obj,timeFlag) {
	if(typeof inputObj == "undefined")return;
	
	var format="%Y-%m-%d %H:%M:%S";
	if (timeFlag!=null && !timeFlag) {
		format="%Y-%m-%d";
	}
	var appendId = document.getElementById(inputObj.id);
	Calendar.setup({
        inputField      :    appendId,   // id of the input field
        ifFormat        :    format,       // format of the input field
        showsTime       :    true,
        timeFormat      :    "24",
        onUpdate        :    function(){}
    });
	
}