onDateSelected doesn't work

I can’t get the “onDateSelected” event to fire on a calendar using DHTMLX Touch.

Here’s a test page :-


And the source for it is :-

<!DOCTYPE html>
<title>Calendar Test</title>
<link rel="stylesheet" type="text/css" href="codebase/touchui.css" />
<script type="text/javascript" src="codebase/touchui.js"></script>
<script type="text/javascript">

In my application I want a user to click / tap a date in the calendar and use the date selected to filter a list. It doesn’t work so I stripped it down to see whether the event itself was firing and it doesn’t appear that it is.

What am I doing wrong?

Correct name of event is onDateSelect

$$('calendar').attachEvent('onDateSelect',function(date){ alert(date); })

If you have found incorrect name somewhere in docs - please point us to the misguiding page

Thanks, that works. The docs are wrong in that case :-

docs.dhtmlx.com/touch/doku.php?i … e_calendar
docs.dhtmlx.com/touch/doku.php?i … teselected

There’s also a reference in the forums (yes, I searched before posting)


Thanks for the quick reply :smiley: