Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

date field sends data to controller on pressing ESC for cancel #584

Open
dhaliman opened this issue Jul 26, 2017 · 0 comments
Open

date field sends data to controller on pressing ESC for cancel #584

dhaliman opened this issue Jul 26, 2017 · 0 comments

Comments

@dhaliman
Copy link

I've a date field
<%= best_in_place instance, :date, as: :date, display_as: :formatted_date, place_holder: '-', class: 'js-in-place-editing', inner_class: 'form-control' %>
Whenever there's a validation error, the text turns red. And if the update is a success it turns green.

Whenever I click on the date field, I see the datepicker. Now if I press cancel, it still sends a request to my controller. This doesn't happen with other fields. Only this.

This is a problem for me because every time I cancel the text changes colour but it shouldn't. and it doesn't get displayed with the display_as option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant