1

I would like to add event that will render in multiple color. Is there any option?

i-e: If event starts on 2 day before current date then it would render blue and after current date it show in red.

I hope you got my point I trying to ask? thanks

bravo
  • 131
  • 2
  • 12
  • have you tried anything?? – The Hungry Dictator Jan 20 '14 at 06:26
  • yes I reviewed all options and callback function that render event. but there is no option to customize event html. – bravo Jan 20 '14 at 06:32
  • please put your code here... – The Hungry Dictator Jan 20 '14 at 06:32
  • Dear Bhatt Basically i m developing project management system for my final year project. I use query fullcalendar plugin that user able to see what project status on calendar. Let say if the project starts lasts month and the due date was last 2 days of current date. so that the event bar should show blue in color till due date and red in color after due date till current date. I didn't apply any technique to achieve this goal, but the code for adding an event – bravo Jan 20 '14 at 06:51
  • The code for adding an event as a project events: [ { title: 'name?> description?>', start: new Date(sy, sm, sd), end: new Date(ey, em, ed), className: 'label-success' }] do u have any idea? – bravo Jan 20 '14 at 06:54
  • Check out this post: http://stackoverflow.com/questions/17920017/change-the-day-background-color-in-fullcalendar Uses the dayRender. http://arshaw.com/fullcalendar/docs/display/dayRender/ – MarCrazyness Jan 20 '14 at 07:05
  • This one is for cells of calendar. But i want to apply 2 colors of event bar. blue color from project startdate to duedate and red color and on the same bar color should change to red from duedate to currentdate. That is all I want. – bravo Jan 20 '14 at 07:25
  • So you want a gradient color change from blue to red on one event? – MarCrazyness Jan 20 '14 at 17:26

2 Answers2

0

you can modify event source object with background color,

this may help you .

You have to find dragstop event and check event.start< new Date() is true than change event object's background color accordingly.

HybrisHelp
  • 5,518
  • 2
  • 27
  • 65
  • eventDragStop: function(event){ alert(event.start); }, is not working. – bravo Jan 20 '14 at 07:10
  • try with `alert('hello')` , is there any `eventDrop: function` ? Actually i am aware with `week calender` not with `fullclander` so i guess you can achieve with this type of function. http://arshaw.com/fullcalendar/docs/event_data/Event_Object/#color-options] – HybrisHelp Jan 20 '14 at 07:17
  • this is working now but this is not i want that change color of whole event object but it should change the color after duedate. In other words i want the event object in 2 colors. – bravo Jan 20 '14 at 07:54
  • you can change color of particulate event using this, Cause you get only that event object which you gonna drag,Just search how to fetch start end time from event, check is in past? if yes,pass required parameter to change color of that event. – HybrisHelp Jan 20 '14 at 08:02
  • well buddy i got ur point. that i fatch end enddate if enddate < currentdate then change the color. But it changing the color of whole event. i-e from startdate to currentdate and i want blue color from startdate to duedate and red color from duedate to currentdate of one event object. – bravo Jan 20 '14 at 08:46
0

I have made a site with calendar and events, below is image of week view with events and past/current/future dates etc, If this is what u need then ping me i can send you or let you know its solution.

enter image description here

Imran Qamer
  • 2,253
  • 3
  • 29
  • 52
  • This is nice. However, I asked this question a year ago. But this will helps me in my future projects. Could you sent me this solution. Thanks – bravo Apr 23 '15 at 08:22
  • ok ping me at night on skype or email me i ll send u when i ll be free – Imran Qamer Apr 23 '15 at 08:24