Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Created Unassigned: Calendar Extender getEffectiveVisibleDate not correct with StartDate and EndDate Set [27502]

$
0
0
Hi,
I've been using AjaxControlToolkit for more than 5 years now, since VS 2008.
I've created a new extender which is just list CalendarExtender but it supports PersianDate.
As I'm in Iran and the default calendar is Persian Calendar here in Iran.
I was upgrading it to make all the new changes you have made to the Calendar Extender and came across quiet a bug, which I've got the solution for it as well.
There is a StartDate and EndDate property in CalendarExtender but, if they are set and the current date is not in the duration of valid date, the Extender shows today as default which is kind of incontinent, as the user can't change the date to the valid date, unless they exactly know the valid range, which is not always the case.
So I propose to change the _getEffectiveVisibleDate in javascript to the following:

_getEffectiveVisibleDate: function () {
var value = this.get_visibleDate();
if (value == null)
value = this.get_selectedDate();
if (value == null)
value = this.get_todaysDate();

// Newly added for the aboved issue/bug by F.Ghamsary.
if (value > this._endDate)
value = this._endDate;
else if (value < this._startDate)
value = this._startDate;
// Newly added for the aboved issue/bug by F.Ghamsary.

value = new Date(value);
value.setUTCDate(1);

return this._getDateOnly(value);
},

Thanks for your great effort and great controls.
I'll be glad to help you if you need any :)

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>