我正在使用jQuery datepicker,其minDate为4,不包括周末和假日,并调整minDate以排除当天下午2点之后的当天.现在我需要以某种方式考虑时区,因为我希望这基于我的时区,PT,而不是用户的时区.我知道我getTimeZoneOffset可能是一个可行的选择,但我正在努力将如何以及在何处将其添加到我当前的设置中.
<script type="text/javascript">
$(document).ready(function() {
//holidays
var natDays = [
[1, 1, 'New Year'], //2014
[1, 20, 'Martin Luther King'], //2014
[2, 17, 'Washingtons Birthday'], //2014
[5, 26, 'Memorial Day'], //2014
[7, 4, 'Independence Day'], //2014
[9, 1, 'Labour Day'], //2014
[10, 14, 'Columbus Day'], //2013
[11, 11, 'Veterans Day'], //2013
[11, 28, 'Thanks Giving Day'], //2013
[12, 25, 'Christmas'] //2013
];
var dateMin = new Date();
dateMin.setDate(dateMin.getDate() + (dateMin.getHours() >= 14 ? 1 : 0));
AddBusinessDays(dateMin, 4);
function …
Run Code Online (Sandbox Code Playgroud)