应该使用什么最佳控件来禁用日期和时间范围,以便用户无法选择它们?
我正在实施船舶预订的业务要求,每次预订都是一个时期(从日期时间:到日期时间)。 因此,我正在寻找一个控件来实现以下功能:
禁用预订时段,以便用户了解预订时段,因此用户无法选择它们。
例如我们有以下预订时段
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
根据上述预订详细信息,除以下日期外的所有日期和时间均应可用
2011 年 1 月 1 日一天应该可用,但从上午 10:00 到 12:00 的时间不应该可用。 02-01-2011 作为一天应该可用,但从 09:00 AM 到 11:59 PM 的时间不应该可用。 03-01-2011 全天和时间应该不可用,因为全天都已预订。 04-01-2011 作为一天应该可用,但从 12:00 AM 到 09:00 AM 的时间不应可用。
那么,有没有一个控件可以实现该功能呢?
或者,如果我要使用 ASP.NET Calendar Control 或 Telerik Calendar Control,如何实现此类功能?
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 periods, 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想您可以使用 telerik 日历使用编码来做到这一点,如这些演示中所示:
http://demos.telerik.com/aspnet-ajax/carrental/default.aspx
http://demos.telerik.com/aspnet-ajax/calendar/examples/design/sunny/defaultcs.aspx
您还可以查看其他实时演示,以了解他们拥有的选择器验证或其代码库中的项目。
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.