Skip to content

Fixes an issue where the ID for the date picker was more than one level #183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions jquery.daterangepicker.js
Original file line number Diff line number Diff line change
@@ -622,10 +622,10 @@
$(window).bind('resize.datepicker',calcPosition);

return this;

function IsOwnDatePickerClicked(evt, selfObj)
{
return ( evt.target == selfObj || (selfObj.childNodes != undefined && $.inArray(evt.target, selfObj.childNodes)>=0))
return ( evt.target == selfObj || (selfObj.childNodes != undefined && $.inArray(evt.target, $(selfObj).find('*'))>=0))
}

function init_datepicker()
@@ -1070,7 +1070,7 @@
renderTime("time2", opt.end);
}

function setTime (name, hour, minute)
function setTime (name, hour, minute)
{
hour && (box.find("." + name + " .hour-val").text(hour));
minute && (box.find("." + name + " .minute-val").text(minute));
@@ -1247,7 +1247,7 @@
autoclose();
}


function weekNumberClicked(weekNumberDom)
{
var thisTime = parseInt(weekNumberDom.attr('data-start-time'),10);
@@ -1275,13 +1275,13 @@
autoclose();
}

function isValidTime(time)
function isValidTime(time)
{
time = parseInt(time, 10);
if (opt.startDate && compare_day(time, opt.startDate) < 0) return false;
if (opt.endDate && compare_day(time, opt.endDate) > 0) return false;

if (opt.start && !opt.end && !opt.singleDate)
if (opt.start && !opt.end && !opt.singleDate)
{
//check maxDays and minDays setting
if (opt.maxDays > 0 && countDays(time, opt.start) > opt.maxDays) return false;