Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Rich on Mar 31, 2009 17:53
open dhtmlx forum
Date selection issue

Hi,

I'm using v.2.1 build 90316


I'm seeing a possible bug in the calendar date selection when using the dhx_blue style. Clicking a gray day outside of the active month will return an incorrect date.

Please follow these steps to reproduce:

- define a simple calendar using dhx_blue style.
- define an onclick event using attachEvent.
- in onclick handler method, call alert to display date string passed as argument.
- now, run your test script and select a date that is outside the displayed month. So, if your calendar control is showing April, select March 31, or May 2.

Your alert will now pop-up and show a string with the wrong date. The date will be as if you clicked on a date for the previous or following month that would be in that slot. So, clicking May 2 would show May 30 and clicking March 30 would show February 23.

What appears to be happening is that clicking the gary day fires the a change_month event BEFORE the date string is constructed that is passed to the onclick event handler. In other words, the changing of the month invalidates the mapping used to build the date string. Whatever builds the date string uses the now-invalid mappiing and thus constructs an incorrect string.

I'll avoid the dhx_blue for the moment but a fix would be appreciated as I was using this style because it is very compatible with my application style.

Thanks,
Rich
Answer posted by Alex (supprot) on Apr 01, 2009 08:12

Hello, 

The issue is confirmed and fixed. Please, try to use attached file.

Attachments (1)