What is the best control should be used for disabling range of dates and times, so user cannot selects them?
I am implementing a business requirement for boats booking, each booking is a period (from datetime : to datetime). So, I'm looking for a control to implement the following functions:
Disable booked periods so user be aware of booked p开发者_StackOverflow社区eriods, hence user cannot selects them.
e.g. We have the following booked periods
BoatName From To
Boat 1 01-01-2011 10:00 AM 01-01-2011 12:00 AM
Boat 1 02-01-2011 09:00 AM 04-01-2011 09:00 AM
Based on above booking details, all dates and times should be available except the following
01-01-2011 as a day should be available but times from 10:00 AM to 12:00 shouldn't be available. 02-01-2011 as a day should be available but times from 09:00 AM to 11:59 PM shouldn't be available. 03-01-2011 the whole day and time shouldn't be available because the whole days is booked. 04-01-2011 as a day should be available, but times from 12:00 AM to 09:00 AM shouln't be available.
So, is there a control that can implement that functionality?
Or, if I'm going to use ASP.NET Calendar Control or Telerik Calendar Control, how to implement such functionality?I suppose you can do that with the telerik calendar using coding as in these demos: http://demos.telerik.com/aspnet-ajax/carrental/default.aspx http://demos.telerik.com/aspnet-ajax/calendar/examples/design/sunny/defaultcs.aspx
You may also take a peek at other live demos for picker validation they have or projects in their code library.
精彩评论