Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Janusz on Nov 17, 2008 01:36
open dhtmlx forum
Tabs on page when using Calendar

Hi,
I have a following situation in my application:
right now the calendar is shown and hidden on onclick event but I want him to be shown on onfocus event and hidden on
onblur event as well

Is it possible to register the calendar to onfocus and onblur events at the moment?

Rgds,
Janusz
Answer posted by Support on Nov 17, 2008 04:05
You can register it with custom code

dhtmlxEvent(element,"blur",function(){
       calendar.hide();
});
dhtmlxEvent(element,"focus",function(){
       calendar.show();
});
Answer posted by Paweł on Nov 17, 2008 05:15
After registering these event the selection in the calendar
is not transported to the input field.

I tested it step by step. And it seems that after adding 'blur'
event the entry from the calendar is not passed to the input field.
Answer posted by Support on Nov 17, 2008 07:24
dhtmlxEvent(element,"blur",function(){
  this.value=calendar.getFormatedDate();
  calendar.hide();
});