-
-
Notifications
You must be signed in to change notification settings - Fork 365
The Color object has no possibility to have no value, it always defaults to #000 #127
Comments
Which version of the plugin are you using? This was fixed, you can actually have an empty input with no color: http://jsfiddle.net/0vopxm13/ Thanks |
Dear, The sample you provided does indeed support an empty input. Yet it still has a value set as the color. I pointed out why the issue is still occuring by specifying which lines of codes are causing the issue. The Color object has no possibility to have no value. And the source code comes from the github repo: https://github.com/mjolnic/bootstrap-colorpicker/blob/master/dist/js/bootstrap-colorpicker.js line 27. Looking at the sourcecode, I don't see how it can be fixed yet. Thanks ! |
I see, the problem is in the API level. This needs a fix, indeed Thanks for clarifying |
it would be nice to also have a button to clear the selected color, maybe built inside the color picker... |
@azza0091 for doing so you have options that allow you to have custom templates =) |
While I see this has been closed, is there something I need to do to implemented this? Using the latest, when my field is empty it will assign a value of #000000. I would expect an empty field to remain empty. |
Why is there no option to clear the currently selected color, and make the color optional ? (Or am I missing something?)
Currently it always defaults to black, as described in #87 . Strange to see this issue being closed without the problem itself being adressed.
In my case setting a color is optional. I could work around this using a checkbox to enable/disable the colorpicker. However, I would prefer, from a UX point of view, to enable the user to simply clear his input (or even select NO COLOR from the component).
Using transparant for this is not an option, since transparant is a valid color option aswell. We realy need a way to distinguish no inputs from actual inputs.
Is there a possible workaround? As described in issue 87, the Color class defaults to black due to the following lines:
Thanks,
The text was updated successfully, but these errors were encountered: