Kendo colour picker not accepting RGB(x,x,x) string.

2 posts, 0 answers
  1. Sean
    Sean avatar
    1 posts
    Member since:
    Jul 2013

    Posted 15 Aug 2013 Link to this post

    <div class="k-block">
        <div class="k-header k-shadow"><span class="k-icon k-i-pencil"></span>Employee Colour</div>
        <div class="editor-label">
                @Html.LabelFor(x => x.BackgroundColour)
            </div>
            <div class="editor-field">
                @(Html.Kendo().ColorPicker().Name("BackgroundColour").Palette(ColorPickerPalette.Basic).Value(Model.BackgroundColour))
                @Html.TextBoxFor(x => x.BackgroundColourInput, new { @class = "editor-colour"})
            </div>
            <br />
            <div class="editor-label">
                @Html.LabelFor(x => x.TextColour)
            </div>
        <div class="editor-field">
            @(Html.Kendo().ColorPicker().Name("TextColour").Palette(ColorPickerPalette.Basic).Value(Model.TextColour))
             @Html.TextBoxFor(x => x.TextColourInput, new { @class = "editor-colour"})
        </div>
        <br/>
    </div>
    I'm using the code above to load a colour picker, the Model.BackgroundColour and Model.TextColour are strings as below:

    rgb(0,255,255)

    but when the form loads, the initial colour is always black, can someone tell me what I'm doing wrong please, as looking at the documentation it seems this should work. I should also point out that passing a string as below:

    #00FFFF

    does work.

    Thanks.
  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2159 posts

    Posted 16 Aug 2013 Link to this post

    Hi Sean,


    I managed to reproduce the issue on my side too and I have escalated it to the development team for fixing. As a small sign of gratitude I also updated your Telerik points.

     

    Regards,
    Dimiter Madjarov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top