0

well coming straight to point .

I am having a form with many controls and i am performing some sort of validations on it . I been stuck at one thing i have attached DATE-PICKER to one of My text-boxes and i want to validate Textbox accordingly .

I don't want to provide user to enter ANYTHING in textbox Rather i love to give him Calendar to select from when he clicks inside textbox .

In Html:

<input type="text" id="effectivedate" />

Jquery :

$('#effectivedate').datepicker();

Well any better solution or advice is appreciated .

PS: The thing why i am restricting is just because i don't user to enter some junk values .

Regards

1 Answer 1

1

Try to make the taxtbox readonly:

 <input type="text" id="effectivedate" readonly="readonly" />

It will solve your problem.

Sign up to request clarification or add additional context in comments.

1 Comment

yeah it works cool. Its pretty basic one i missed it . Tought of it duh . anyways thank you for heads-up . cheers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.