Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 388870

Summary: DateTime Calendar Day component theming issue
Product: [RT] RAP Reporter: Ronald So <ronald.so>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: gmalary, tbuschto
Version: 1.5   
Target Milestone: 2.0 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
The DateTime Calendar widget that shows the month of the day in dark grey color instead of red that I defined in the CSS file. none

Description Ronald So CLA 2012-09-05 14:23:07 EDT
I have hit into a CSS styling issue with the DateTime Calendar widget.  I am using RAP 1.5M3.

This is what I have posted in the RAP forum.

http://www.eclipse.org/forums/index.php/t/373015/
==============================================================
Hi,

I have the following code in the CSS file.

Code: [Select all] [Show/ hide]
DateTime-Calendar-Navbar {
    border: none;
    border-radius: 0;
    background-color: transparent;
    background-image: gradient(linear, left top, left bottom,
              from( rgb(85, 158, 209) ),
              to( rgb(56, 126, 160) )
          );
    color: rgb(250, 250, 250);
    text-shadow: none;
}

DateTime-DropDownCalendar {
    border: 1px rgb(209, 209, 209);
}

DateTime-Calendar-Day {
    color: red;
    background-color: rgb(250, 250, 250);
    text-shadow: none;
}

DateTime-Calendar-Day:otherMonth {
    color: rgb(200, 200, 200);
}

DateTime-Calendar-Day:hover {
    color: rgb(250, 250, 250);
    background-color: rgb(60, 60, 0);
}

DateTime-Calendar-Day:selected {
    color: rgb(250, 250, 250);
    background-color: rgb(0, 60, 60);
}

Everything works well except the "red" color I set for DateTime-Calendar-Day. Shouldn't all days (digits) in the current month be "red" in color? I don't have issues to set the "otherMonth" day style but interestingly the regular state fails to work.

I will attach a screenshot after this post.  Thanks.
Comment 1 Ronald So CLA 2012-09-05 14:27:09 EDT
Created attachment 220744 [details]
The DateTime Calendar widget that shows the month of the day in dark grey color instead of red that I defined in the CSS file.
Comment 2 Tim Buschtoens CLA 2012-09-06 04:14:09 EDT
The issue is in DateTime.appearance.js, "calendar-day":

      if( !states.disabled && ( states.selected || states.otherMonth || states.over ) ) {
        result.textColor = tv.getCssColor( "DateTime-Calendar-Day", "color" );
        result.backgroundColor = tv.getCssColor( "DateTime-Calendar-Day", "background-color" );
      } else {
        result.textColor = tv.getCssColor( "*", "color" );
        result.backgroundColor = "undefined";
      }
Comment 3 Tim Buschtoens CLA 2012-09-28 10:51:01 EDT
Fixed this and some other oddities that probably existed since the code was originally written with commit d39938b83d972f0d35602343745a4ff18d16887f.