jlrozano Posted November 30, 2012 Share Posted November 30, 2012 Hi, Is possible set custom color for calendar events? Thank. Quote Link to comment Share on other sites More sharing options...
Anachronox Posted November 30, 2012 Share Posted November 30, 2012 Hi, Is possible set custom color for calendar events? Thank. Hi, I'm waiting for similar stuff for Calendar: http://forums.unigui.com/index.php?/topic/2351-version-0900/page__view__findpost__p__11677 http://forums.unigui.com/index.php?/topic/2351-version-0900/page__view__findpost__p__11567 Quote Link to comment Share on other sites More sharing options...
warmbooter Posted August 25, 2016 Share Posted August 25, 2016 The lack of control of the event font color is really a pain. In a CalendarPanel with 5 Calendars, it chooses bad colors for the events text, making it really difficult to read. Sometimes, it sets the event font color as the same as the background, making it impossible to read. Does anyone knows a workaround for this problem? Quote Link to comment Share on other sites More sharing options...
mhmda Posted August 27, 2016 Share Posted August 27, 2016 Yes you can, here is how to do it: Calendar event color depends on EventID. id1=.ext-color-1 id2=.ext-color-2 id3=.ext-color-3... and so on... So I add js code, for ecample: Form->UniEvents->beforeinit: function randomColor() { var rgb = []; for(var i = 0; i < 3; i++) { if(i==1) rgb.push(Math.floor(Math.random() * 50)); else rgb.push(Math.floor(Math.random() * 255)); } return 'rgb('+ rgb.join(',') + ')'; } for(var i=1;i<200;i++) { $("<style type='text/css'> .ext-color-"+i.toString()+"{ color:"+randomColor()+";} </style>").appendTo("head"); } 1 Quote Link to comment Share on other sites More sharing options...
zemorango Posted November 21, 2017 Share Posted November 21, 2017 Hi Mohammad, Regarding your example, how do I change the unicalendar colors of a date cell at runtime, I used you code to create the colors styles but how to make a specific date have one of those colors? Regards Jose Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.