0

I am using jQuery Tools v1.2.7 and jQuery v1.7.2. I have the following code:

<input type="date" name="delivery_due" required="required">

With the following settings:

$("form.validate").validator();
$(document).ready(function(){
    $(":date").dateinput( { format: 'yyyy-mm-dd', min: 0 });
});

The validation script always sees the date field as null; even if I have selected a value and that value is displayed within the input field. It has no issues with any other field with a required attribute; just the date-range.

Robert
  • 6,881
  • 1
  • 21
  • 26

1 Answers1

0

New and improved answer: Try running $("form.validate").validator(); after the dateinput function. I think this should do the trick.

Old stupid answer: Try changing $(":date").dateinput(... to $("input[name=delivery_due]").dateinput(...

playeren
  • 87
  • 1
  • 6
  • Neither of these solutions on their own worked; I solved the issue by placing date call OUTSIDE of the document.ready. – Robert Apr 06 '12 at 16:47
  • Ok, I can see how that helps the timing problem. Thanks for accepting my answer, though. – playeren Apr 06 '12 at 16:52