Uploaded image for project: 'ZK Calendar'
  1. ZK Calendar
  2. ZKCAL-103

onDayClick event is not fired

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 3.1.2
    • 3.1.1
    • None

      Steps to Reproduce

      <calendars height="100%" width="100%" beginTime="8"
                 onDayClick="System.out.println(event)" onWeekClick="" />
      

      1. click day header e.g. Mon 3/6

      Current Result

      the component doesn't fire onDayClick event

      Expected Result

      the component fires onDayClick event

      Debug Information

      Calendars.js

      	
      	addDayClickEvent_: function (element) {
      ...
      			if (target.tagName == 'SPAN')
      				widget.fire('onDayClick',{data:[target.time]});
      

      But there is no span in calendar 3.x, it works in 2.x

      case2: Steps to reproduce

              <button label="setday 5" onClick='cal.setDays(5)'/>
              <label id="msg"/>
              <calendars id="cal" height="90%" days="1"
                         width="800px" mold="default" onDayClick="System.out.println(event.data)"/>
      
      1. click the button to set days to 5
      2. check click listener on the header

      Current Result

      no click listener

      Expected result

      a listener on day-header like:

      Workaround

      zkcal-103.js

            hawk hawk
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: