SwarmOnline / Ext.ux.TouchCalendar

Sencha Touch Calendar component
113 stars 47 forks source link

Tapping on time rows in day view throws JS error #27

Open ajinkyac opened 10 years ago

ajinkyac commented 10 years ago

Steps to reproduce:

  1. Invoke the calendar
  2. Switch to day view
  3. Tap on any time rows

It throws error in onTimeSlotTap, Line# 593 When we call this.getCellDate(target) it fails. As per the code in getCellDate, we fetch the attribute - datetime from 'td' but in our case the 'td' does not have datetime attribute hence returning undefined.

Either we could do (in getCellDate): var date = dateCell.dom.getAttribute('datetime') || dateCell.up('tr').down('td').getAttribute('datetime');

or on line# 597:

<td class="time-block" datetime="{[this.me.getDateAttribute(values.date)]} colspan="2">

Stuart98 commented 10 years ago

I can't replicate this issue with the current version on the example apps. Can you check your using the latest code or put up a test case showing it happening?

Thanks!