Skip to content

Commit

Permalink
fix(ie11-clickdate): Unable to select custom date range from calendar…
Browse files Browse the repository at this point in the history
… in IE1

Fix #72 thanks to @cool-ankit
  • Loading branch information
fetrarij committed Dec 14, 2018
1 parent 5c4f754 commit 0a07dab
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/daterangepicker/daterangepicker.component.ts
Expand Up @@ -934,8 +934,14 @@ export class DaterangepickerComponent implements OnInit {
* @param col col position of the current date clicked
*/
clickDate(e, side: SideEnum, row: number, col: number) {
if (!e.target.classList.contains('available')) {
return;
if (e.target.tagName === 'TD') {
if (!e.target.classList.contains('available')) {
return;
}
} else if (e.target.tagName === 'SPAN') {
if (!e.target.parentElement.classList.contains('available')) {
return;
}
}
if (this.rangesArray.length) {
this.chosenRange = this.locale.customRangeLabel;
Expand Down

0 comments on commit 0a07dab

Please sign in to comment.