Turn out that the _getDate() will fall back to today when not found.
So I need to manually parse it and thus calling _setDateFromField
doesn't matter...
$.fn.getInputDate = function(){
var elem = this[0];
if(elem){
var inst = $.datepicker._getInst(elem._calId);
The above code has some error.
Here is my final solution: write another plugin to get the date.
HTML:
Plan Date: to
Actual Date: to
JS:
$("#dateRange input").datepickerRange({showOn:'button'});
/* Update datepicker if found and return the date */
$.fn.getInputDate = function()
I have found some wicked way to do it.
This is the code where I'm writing a plugin to accept date range pair
and auto-init them.
//Assuming from/to date have same prefix id (e.g. #eventFromDate,
#eventToDate)
$.fn.datepickerPair = function(options){
return this.datepicker(
$.extend({
3 matches
Mail list logo