You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$(":date").dateinput({
format: 'mm/dd/yyyy',
// a different format is sent to the server
change: function() {
var isoDate = this.getValue('yyyy-mm-dd');
$("#backendValue").val(isoDate);
}
});
No longer changes the value that is sent on the backend. The value that is sent to the server on submission is the format specified in format.
The text was updated successfully, but these errors were encountered:
I've run some tests - as far as I can see, it seems to work as detailed in the docs? Take a look at http://jquerytools.github.io/documentation/dateinput/index.html - the docs state "Specifies how the date value is formatted in the input field. See formatting for more details."
In the tests I ran, I had format: 'You selected: dddd / dd.mm.yyyy', in my code; it returned "2015-07-29" in the browser's console log.
Are you able to post an example that shows it doesn't change the value for you please, so we can see what it is doing for you?
I should specify that I am running this in conjunction with jquery 1.10.2 and not including jquerytools version 1.7 of jquery.
<script>
$(":date").dateinput({
format: 'mm/dd/yyyy',
// a different format is sent to the server
change: function() {
var isoDate = this.getValue('yyyy-mm-dd');
$("#backendValue").val(isoDate);
}
});
</script>
I've tried the same demo again, but jQuery 1.10.2 / jQuery Migrate 1.2.1 (to allow for the known $.browser issue), and the 1.2.6 CDN link of Tools (excluding jQuery) - I still can't replicate the issue; it's working as per the documentation for me?
You say it is returning 'mm/dd/yyyy' to the server - I assume you've checked this using a console log statement, right? Is anything else manipulating the value once it has been rendered? I've also tried piping out the value from (in this case) #backendValue. and it matches that shown in the console log, so I'm struggling to see where the issue is?
$(":date").dateinput({
format: 'mm/dd/yyyy',
// a different format is sent to the server
change: function() {
var isoDate = this.getValue('yyyy-mm-dd');
$("#backendValue").val(isoDate);
}
});
No longer changes the value that is sent on the backend. The value that is sent to the server on submission is the format specified in format.
The text was updated successfully, but these errors were encountered: