1. #1
    Ext User
    Join Date
    Aug 2009
    Posts
    9
    Vote Rating
    0
    ror is on a distinguished road

      0  

    Default How to change textfield color in DateField

    How to change textfield color in DateField


    Hello,
    I am using datefield and I need to change a color(and border) of textfield. I am trying use a style, but it doesen't work. DatePicker is in Layout Container.

    Code:
                    DateField data = new DateField();
                    data.setWidth(150);
    		data.setFormatValue(true);
    		data.getPropertyEditor().setFormat(DateTimeFormat.getFormat("dd MMMM y"));
    		data.setValue(new Date());
                    data.setStylePrimaryName("userDatePickerClear");
    and CSS

    Code:
    .userDatePickerClear{
    	background-color: none !important;
    	background-image: none !important;
    	background-color: red !important;
    }
    In firebug I don't see that datepicker use this style, but when I add style to layout containter its take effects. I am must change color only textfield (datepicker must be untouched).

  2. #2
    Ext User
    Join Date
    Sep 2008
    Location
    Germany
    Posts
    961
    Vote Rating
    1
    Arno.Nyhm is on a distinguished road

      0  

    Default


    better use:

    PHP Code:
    data.addStyleName("userDatePickerClear"); 
    and this css
    PHP Code:
    .userDatePickerClear .x-form-text {
        
    background-imagenone !important;
        
    background-colorred !important;

    This forum needs your help: you got hints from the community and now you have fixed your code? dont just reply with "now its fixed" or "i found the error"! please take the time to post also an detailed answer with the working code.

    GreaseMonkey Script for a GXT-only Forum: it hides ExtJs here: New Posts • Search Results • Advanced Search form • Category overview http://www.extjs.com/forum/showthrea...041#post410041

  3. #3
    Ext User
    Join Date
    Aug 2009
    Posts
    9
    Vote Rating
    0
    ror is on a distinguished road

      0  

    Default


    Thanks for answer, I need something like datepicker+label (not edit). I try to write own component but I found another problem (i will create another thread - all problem must by solved ). Fastest way to have this functionality is change existing datepicker.
    I add some button (+some lines of code). Only what i need now is to
    -align text in edit to right
    -disable validation checking (I use some special formatting in edit and warning about error is shoving on my additional button).

  4. #4
    Ext User
    Join Date
    Sep 2008
    Location
    Germany
    Posts
    961
    Vote Rating
    1
    Arno.Nyhm is on a distinguished road

      0  

    Default


    Quote Originally Posted by ror View Post
    Thanks for answer,
    the idea was to point you not using the GWT setStylePrimaryName but the GXT addStyleName. and not the setStyleName but the addStyleName ... and refine the item you will style.

    did my suggestion works?

    Quote Originally Posted by ror View Post
    I need something like datepicker+label (not edit).
    ah ok - that was not the question in your first part ;-) maybe you just only hide the editfield with css?

    so you need a datepicker but with a hidden textfield? or im wrong.
    maybe you have a example picture how it should looks like.


    Quote Originally Posted by ror View Post
    I try to write own component but I found another problem (i will create another thread - all problem must by solved ). Fastest way to have this functionality is change existing datepicker.
    I add some button (+some lines of code). Only what i need now is to
    -align text in edit to right
    you can do this with a custom css style.

    Quote Originally Posted by ror View Post
    -disable validation checking (I use some special formatting in edit and warning about error is shoving on my additional button).
    you can use a custom renderer to check the formatting or just return true ...
    This forum needs your help: you got hints from the community and now you have fixed your code? dont just reply with "now its fixed" or "i found the error"! please take the time to post also an detailed answer with the working code.

    GreaseMonkey Script for a GXT-only Forum: it hides ExtJs here: New Posts • Search Results • Advanced Search form • Category overview http://www.extjs.com/forum/showthrea...041#post410041

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi