I have try with your multi month date picker with start date and end date,
but when i select suppose start date through date picker like 18/12/2009
and when i click on the "end-date" input box, the date before the
18/12/2009 are not disable in date picker but it not allow to select date
before 18/12/2009.
so i want dates before the 18/12/2009 in the end-date picker must be disable.
how can i do this?
i have used following code in my js file but it is not working:-
$(document).ready(function()
{
$('.date-pick')
$('#start-date').bind(
'dpClosed',
function(e, selectedDates)
{
var d = selectedDates[0];
if (d) {
d = new Date(d);
$('#end-date').dpSetStartDate(d.addDays(1).asString());
}
}
);
$('#end-date').bind(
'dpClosed',
function(e, selectedDates)
{
var d = selectedDates[0];
if (d) {
d = new Date(d);
$('#start-date').dpSetEndDate(d.addDays(-1).asString());
}
}
);
$('.date-pick')
.datePickerMultiMonth({numMonths: 3,createButton:true})
.bind(
'focus',
function(event, message)
{
if (message == $.dpConst.DP_INTERNAL_FOCUS) {
return true;
}
var dp = this;
var $dp = $(this);
$dp.dpDisplay();
$('*').bind(
'focus.datePicker',
function(event)
{
var $focused = $(this);
if (!$focused.is('.dp-applied')) //
don't close the focused date picker if we just opened a new one!
{
// if the newly focused element
isn't inside the date picker and isn't the original element which triggered
// the opening of the date picker
if
($focused.parents('#dp-popup').length == 0 && this != dp &&
!($.browser.msie && this == document.body)) {
$('*').unbind('focus.datePicker');
$dp.dpClose();
}
}
}
);
return false;
}
).bind(
'dpClosed',
function(event, selected)
{
$('*').unbind('focus.datePicker');
}
);
});
sonali
PHP programmer
Original issue reported on code.google.com by sonaliji...@gmail.com on 2 Dec 2009 at 7:29
Original issue reported on code.google.com by
sonaliji...@gmail.com
on 2 Dec 2009 at 7:29