Destroy ColorPicker

2 posts, 0 answers
  1. Jason
    Jason avatar
    16 posts
    Member since:
    Jul 2006

    Posted 29 Jul 2013 Link to this post

    Given I have an input element that has already been converted to a color picker.  ( ex: $(input).kendoColorPicker(); )

    1. How do i get a reference to that color picker to say set the value?
    2. Destroy that color picker?


  2. Holger
    Holger avatar
    78 posts
    Member since:
    Nov 2012

    Posted 30 Jul 2013 Link to this post


    1.    You can access the ColorPicker widget like this:
    var colorPicker = $(input).data('kendoColorPicker');
          To set the color you can either use the color() or the value() method.

    2.    To destroy the widget use the destroy() method. The destroy method does not remove the element from the DOM, but destroys it's JavaScript representation.

Back to Top