We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Scheduler Dates

Thread ID:

Created:

Updated:

Platform:

Replies:

62715 Jun 20,2007 09:05 PM UTC Jun 23,2007 01:20 AM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: Tools
James Thomas
Asked On June 20, 2007 09:05 PM UTC

Hello,

I have a scheduler control that displays 5 days at a time (week) and hides weekends. I would like the advance controls to move forward 5 days instead of one day. Is there any way to do this that I'm missing?

Thanks,

James

Gokul B [Syncfusion]
Replied On June 20, 2007 11:59 PM UTC

Hi James,

Attached is the sample as per your requirement. In our sample we have advance the date to forward 5 days from the date displayed once the VisibleDay button of the Scheduler control is pressed.

http://websamples.syncfusion.com/samples/Tools.Web/5.1.0.51/F62715/Scheduler_Inc62715/main.htm

* We have acheived this behaviour using the Scheduler control "CheckVisibleDay" event.
* We used Session variable to persist the advanced date to take effect on Page reload.

Let us know if our sample helps.

Thanks for using syncfusion products.

Regards,
Gokulkumar B

James Thomas
Replied On June 22, 2007 11:16 PM UTC

This actually doesn't work when going back - it just advances 5 days regardless (I realized after I sent this that I actually wanted it to advance 7 but that's not a big deal). The CheckVisibleDayEventArgs does not have an option for which direction was clicked.

Any thoughts?

James Thomas
Replied On June 23, 2007 01:20 AM UTC

I actually got this to work by overloading using the StartDateChanged event as follows:

protected void Scheduler1_StartDateChanged(object sender, StartDateChangedEventArgs e)
{
if (e.OldStartDate < Scheduler1.StartDate) // Moving forward
Scheduler1.StartDate = AdjustDateToMonday(Scheduler1.StartDate, true);
else // Moving backward
Scheduler1.StartDate = AdjustDateToMonday(Scheduler1.StartDate, false);
}

AdjustDateToMonday simply takes the date and adds (or subtracts) the correct number of days so we always wind up on a Monday when going forward or backwards.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;