lundi 20 juillet 2020

Ruby on Rails - change span tag with input datapicker tag and call a ajax using jquery

I have a span tag

<span id="date_first_collection"><%= date_first_collection %></span>

I want to change this to input datepicker tag when someone clicks on it and if there is a value change then do an ajax call to my controller action else nothing.

def update_date_first_collection
 some code
end

how to do this thing using jquery.

Aucun commentaire:

Enregistrer un commentaire