ui.datepicker.js form validation (solved)

Posted by lena on Stack Overflow See other posts from Stack Overflow or by lena
Published on 2010-05-08T23:14:18Z Indexed on 2010/05/09 0:48 UTC
Read the original article Hit count: 256

Hi,

I'm using ui.datepicker.js and I want to validate the date field to make sure the user select a date.

I have tried

function allow_submit()
{

 var f = document.all.frm;

  if (f.date.value == "") {
    jAlert("Please select a date");
    return false;
  } //if

  return true;
}

and also have try

if (f.date.value == "0000-00-00") {

without succes

Any clue?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about form-validation