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

ZK Calendar display wrong show more labels in the month mold when use custom HTML content

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.1.2
    • 2.1.1
    • None

      <zk>
      	<calendars escapeXML="false" id="calendars"  mold="month" height="250px"/>
      	<zscript><![CDATA[
      		import org.zkoss.calendar.*;
      		import org.zkoss.calendar.impl.*;
      		import java.text.*;
      		import java.util.Calendar;
      		
      		SimpleCalendarModel cm = new SimpleCalendarModel();
      		SimpleDateFormat dataSDF = new SimpleDateFormat("yyyy/MM/dd HH:mm");
      		
      		Calendar cal = Calendar.getInstance();
      		int year = cal.get(Calendar.YEAR);
      		int mod = cal.get(Calendar.MONTH) + 1;
      		int date = cal.get(Calendar.DATE);
      		String a = mod > 9 ? year + "/" + mod + "" :  year + "/" + "0" + mod;
      		String d = date > 9 ? a + "/" + date  :  a + "/" + "0" + date;
      		
      		for (int i = 0; i < 2; i++) {
      			
      		}
      		
      		SimpleCalendarEvent sce1 = new SimpleCalendarEvent();
      		sce1.setBeginDate(dataSDF.parse(d + " 00:00"));
      		sce1.setEndDate(dataSDF.parse(d + " 01:00"));
      		sce1.setHeaderColor("#A32929");
      		sce1.setContentColor("#D96666");
      		// ce.setTitle() if any, otherwise, the time stamp is assumed.
      		sce1.setContent("aa<br/>bb");
      		cm.add(sce1);
      		calendars.setModel(cm);
      	]]></zscript>
      </zk>
      

            jimmyshiau jimmyshiau
            jimmyshiau jimmyshiau
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: