Created
July 23, 2011 11:27
-
-
Save shaneriley/1101324 to your computer and use it in GitHub Desktop.
datetime-local serialization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $form = $("form"), | |
values = $form.serializeArray(); | |
// jQuery doesn't currently support datetime-local inputs despite a | |
// comment by dmethvin stating the contrary: | |
// http://bugs.jquery.com/ticket/5667 | |
// Manually storing input type until jQuery is patched | |
$form.find("input[type='datetime-local']").each(function() { | |
var $i = $(this); | |
values.push({ name: $i.attr("name"), value: $i.val() }); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment