-2

see the image https://i.stack.imgur.com/5Fihp.png

        String script="zk.afterLoad(\'zul.db\', function(){ var blub = "+dates+";zul.db.Renderer.disabled = function (cal, YYYY, mm, dd, today){ mm < 10 ? month = \"0\" +(mm + 1) : month = (mm + 1); dd < 10 ? day = \"0\" + dd : day = dd ; date = \"\" + YYYY + month + day ;if(blub.indexOf(date) >= 0){}else{return false;}};"+
        " zul.db.Renderer.cellHTML = function (cal, YYYY, mm, dd, monthofs){mm < 9 ? month = \"0\" +(mm + 1) : month = (mm + 1);dd < 10 ? day = \"0\" + dd : day = dd;date = \"\" + YYYY + month + day;if (blub.indexOf(date) >= 0){return \'<div style=\"color:white;padding:5px;background-color:#FF0000; color:white;border-radius:25px;height: 10px;width: 12px;font:12px;\"><span style=\"\">\' + dd + \'</span></div>\';}else{return dd;}}; });";
        Clients.evalJavaScript(script);                         

but the problem is that it is also displaying previous month date background color also red like Ex: i have updated a three year database and i have updated all sunday as holiday. so i want to display background color is red. but it is also display background for date 29-12-2015 red, but already highlited on date 29-11-2015. and that is the issue for all months.

thanks

manoj kumar
  • 11
  • 1
  • 3

1 Answers1

0

Assign different class or id using javascript and use stylesheets to assign different backgrounds.

so while returning a value you can use a conditional logic to check if it is the current date and if it is, assign a class, for the rest assign a different class.

Refer to this for current date in a relevant format.

Community
  • 1
  • 1