jquery - Javascript datepicker without using id -


i use datepicker code in following jsfiddle

http://jsfiddle.net/27ktr/1/

it working. take date picker id value like

 new datepickr('datepick2', {         'dateformat': 'd/m/y'     }); 

but need datepicker without using id value. how possible.please me.

for using datepicker id try like

$("#id").datepicker({'dateformat': 'd/m/y'}); 

or if want use class try

$(".class").datepicker({'dateformat': 'd/m/y'}); 

you can use tags like

$("input[type='text']").datepicker({'dateformat': 'd/m/y'}); 

see demo uses external resources jquery-ui.js , try way

and try options http://jqueryui.com/datepicker/ can go date picker


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -