问题描述
您好,
reportdate和_paystartdate是我的jquery函数中的两个日期变量,其中_paystartdate是支付期开始的日期,reportdate是单日的日期。现在我需要检查reportdate是否在payperiod的第一周,这意味着reportdate应该在_paystartdate和_paystartdate + 6之间。我如何实现这个目标?
var _paystartdate = $('[id $ = hdnPayPeriodStartDt]')。val();
var reportdate = $('[id $ = datepicker]')。val();
Hello,
reportdate and _paystartdate are two date variables in my jquery function where _paystartdate is date from which pay period starts from and reportdate is a date for single day. Now I need to check if reportdate is in first week of payperiod that means reportdate should be between _paystartdate and _paystartdate+6. How do I achieve this?
var _paystartdate = $('[id$=hdnPayPeriodStartDt]').val();
var reportdate = $('[id$=datepicker]').val();
推荐答案
这篇关于如何使用jquery检查特定日期是否在一周内的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!