on 05-21-2015 11:30 AM
Hi Experts,
Generally for a date field if we choose F4, by default Standard calendar will be displayed in CRM WEB UI. My requirement is to display calendar with color coding.Certain dates in the month should be displayed as green, where as some other in another color. Please let me know your inputs how to implement these changes?
Example
1) from 3 to 9, it should be in green
2) From 10 to 16, it should be in orange
3) From 17 to 23, it should be in green.
2
Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday |
---|---|---|---|---|---|---|
1 | ||||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Thanks & Regards,
S.Gangireddy
Hi Gangireddy,
there is no standard customizing to change color for your requirement as said Bruce Li,
what you have to do is go to that class cl_chtmlb_calendar_month method render_calendar_body
there is a statement for background color.
IF ME->REFERENCE_DATE+4(2) <> IV_DATE+4(2) AND
ME->PRINT_MODE EQ 'FALSE'.
* LV_BACKGROUND = '#F9F9F9'.
* Commented by STEFANOVST, causing issue in IE7
* @todo: Maybe in general, colors should be defined in CSS
ELSE.
IF ME->PRINT_MODE EQ 'FALSE'.
LV_BACKGROUND = cl_thtmlb_util=>escape_xss_xml_html( ME->CALENDARBACKGROUND ).
ELSE.
LV_BACKGROUND = 'FFFFFF'.
ENDIF.
ENDIF.
just change the color code in run time you will get colors..
i have checked in my system this will work like this.
what you have to do is create implicit enhancement for that method and try to implement code according to your requirement.
try to explore this link might be helpful to you. these is related to factory calendar based on holidays she has populated color but in your Scenario you have to populate color based on ur condition.
Regards,
Srinivas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi S.Gangireddy,
For the month view of canlendar, you can debug at following method. There is no standard customzing to change color. So you need to change the coding and css files correspondingly.
CL_CHTMLB_CALENDAR_MONTH
Method RENDER_CELL_BODY
CL_CHTMLB_CALENDAR_MONTH
METHOD RENDER_CALENDAR_BODY
Best Regards,
Bruce
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.