Lello
August 18, 2015, 10:35am
#1
Hi
About calendar item, I would like to e know how i can close the calendar in automatic when focus is out of calendar item.
I would like to make it as standard feature for all calendar item in form . It’s possible ??
Tanks a lot
Regards
Antonello
Darya
August 18, 2015, 2:40pm
#2
Hi
You can get calendar inputs and add javascript “onblur” event
Lello
August 27, 2015, 12:44pm
#3
Sorry Darya,
Can you get me an example how i can do it ??
Thanks so much
Beste regard
Antonello
Darya
August 27, 2015, 2:55pm
#4
I.e. you need such behavior for 1th calendar:
formData = [
{type: "calendar",
dateFormat: "%d.%m.%Y",
serverDateFormat: "%Y-%m-%d",
name: "Date1",
label: "Date 1",
calendarPosition: "right"},
{type: "calendar",
dateFormat: "%d.%m.%Y",
serverDateFormat: "%Y-%m-%d",
name: "Date2",
label: "Date 2",
calendarPosition: "right"}
];
myForm = new dhtmlXForm("myForm1", formData);
inp1 = myForm.getInput("Date1");
cal1 = myForm.getCalendar("Date1");
inp1.onblur = function(){
cal1.hide();
};