Thursday 5 June 2014

Customization of Date Input Component in pentaho CDE

Hello Guys,

In this post i would like to explain How to Customziation look and feel of the select date input component.

Here i am just overriding the by default css to my own css file.

Step 1:Create the external css file instead of chnaging by deafult file.

Step 2: css code
#render_date /* date here date input component name you can replace by your own name*/
{
border:1px solid #808000!important;
color:#BDB76B!important;
}
.ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year {
   color:#BDB76B !important;
   border:1px solid #EEE8AA!important;
}
.ui-widget-header {
  
   border: 6px solid #EEE8AA!important;
    background: none repeat scroll 0 0 #808000 !important;
}
.ui-datepicker th{
   background-color: #BDB76B!important;
}
#ui-datepicker-div{
   border:1px solid #EEE8AA!important;
}
.ui-datepicker-calendar{
   background-color:#EEE8AA!important;
}

.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active{
   border: 1px solid #BDB76B!important;
   color: #FFFFFF!important;
   font-weight: bold;
    background: none repeat scroll 0 0 #808000 !important;
}
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
  
   background: none repeat scroll 0 0 #F0E68C;
   color:#362B36;
   border: 1px solid  #BDB76B;
}

 

Step 3: Add that file in your CDE Dashboard.


Result:   By Default    


    
 After Customization :



You can change the color code as per your requirement.

Hope this post helps someone and feel free to give comments and suggestion

Sumit Bansal
BI Developer



8 comments :

  1. 1) Change the dashboard type to bootstrap
    2) Test the output in the server preview.
    3) Test the output in new window.

    Are you losing css styles when you use bootstrap css with above scenarios ?

    ReplyDelete
    Replies
    1. I did not test this scenarios with bootstrap..Right now i am using this component with out bootstrap css.

      Delete
  2. Test it .. if you lose css styles, try to fix that.

    ReplyDelete
    Replies
    1. ok ..But i am 100 % sure i am not losing any css styles..if you are using bootstrap css or not then their is not impact on component.because bootstrap css is used only for developing responsive dashboard not for customization component.

      Delete
  3. Take the back up of the project & deploy in another server (which is installed on another machine).. then check whether you are losing css styles or not ...

    There it seems some problem with built-in selects/date pickers of CDE when you set dashboard type as bootstrap.. I've tested this thing..

    Can you give a trail & test and then update ?

    ReplyDelete
    Replies
    1. Ok Sure...Please give me some time i will update soon ..Right now i am busy in some other priority task..

      Delete
    2. Hello Sadakar...yes its working fine..i have tested each scenarios and also with using dashboard type as bootstrap..let me know if you are facing any issue to implement this

      Delete
  4. Date filter default list 20 year any idia how to increase this range

    ReplyDelete