asp.net - jquery datepicker getting dateText out of onSelect event -


want datetext datepicker out of onselect event, in other function:

example:

when in onselect event:

datetext equal 08.02.2011 

$('#datetime').datepicker("getdate") returns:

tue feb 08 2011 00:00:00 gmt+0300 (russia standard time) 

so can not enter controller properly

datepicker getdate method return date object (date object reference) need convert it

function convert(date) {    return date.getdate() + "."+ (date.getmonth()+1) + "." + date.getfullyear(); } 

you can try overwrite tostring method of date object, don't know how work datepicker plugin.

date.prototype.tostring = function() {    return this.getdate() + "."+ (this.getmonth()+1) + "." + this.getfullyear(); } 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -