开发者

how to write the "if" datetime interval statement that triggers a popup alert window?

I'm using the jQuery FullCalendar plug-in in my asp.net app. I need an alert window to come up when requestors click on a day in the calendar to reserve a date that is less than three we开发者_C百科eks away.

I have the code for the alert that works, like

dayClick: function (date, allDay, jsEvent, view);
alert('The requested date is within the 3 week reservation window.');

But I'm in trouble with a "three weeks" "if" statement/condition, like

if date<=date(+21)

that should trigger the alert pop-up.

Could you please help? Thank you in advance very much!


Dates always seem to be a bit of problem.

But is actually easy in your case. Here is a working solution.

http://jsfiddle.net/ppumkin/7MTdn/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜