只能在当日起的接下来的7天内固定约会 [英] Appointment can be fixed for next seven days only from current day

查看:61
本文介绍了只能在当日起的接下来的7天内固定约会的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

function validateDate()
            {
                        serverDateTime="2012-11-23 17:06:46";
                txtDate.value="30-Nov-2012"

                if (how i check here)
                {
                           alert("Appointment can be fixed for next seven days only from current day.");
                    return false;
                }
                else
                {
                    return true;
                }
            }


我在主页上加载serverDateTime并访问所有页面中的该变量,并将serverDateTime与txtDate.value进行比较,我如何验证约会只能在当前日期之后的7天进行固定.


i m getting serverDateTime on master page load and access that variable in all pages and comparing serverDateTime with txtDate.value how i validate Appointment can be fixed for next seven days only from current day.

推荐答案

选中此链接 [
Check this link[^]. It shows how to get number of days between two dates. If the result is greater than 7 then you need to show the alert message.


这篇关于只能在当日起的接下来的7天内固定约会的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆