Value generated by javascript not sent to the server

coobra

New Member
I am using datetimepicker from the given link as described there.http://www.javascriptkit.com/script/script2/tengcalendar.shtml\[code\] <div class="field"> <label for="scheduled_at"> scheduled_at:</label> <input name="scheduled_at" id="scheduled_at" type="text" size="25" value="http://stackoverflow.com/questions/15731875/<%= scheduled_at %>" ><a href="javascript:NewCal('scheduled_at','ddmmyyyy',true,24)"><img src="http://stackoverflow.com/questions/15731875/cal.gif" width="16" height="16" border="0" alt="Pick a date"></a> </div>\[/code\]The above code is in jst.ejs.My backend code is in rails. The javascript function works well and displays the chosen date by me. But when I submit the form. I can see that the chosen value of \[code\]'scheduled_at'\[/code\] is not sent. Instead the previous default value is sent. If I manually type in the datetime in the same format as that generated by the javascript, it functions properly.Can someone help me why this is happening and what I could do to send the chosen value to the server.I am new to javascripts, rails, basically any sort of web development. So if possible, please give detailed answers and pardon me if the doubt is too trivial.
 
Back
Top