| | |
| | | options.monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; |
| | | break; |
| | | } |
| | | |
| | | if (angular.isDefined($attrs["rangeType"])) { |
| | | $($element).daterangepicker({ |
| | | timePicker: false, |
| | | autoUpdateInput: true, |
| | | autoApply : true, |
| | | minDate : minDate, |
| | | maxDate : maxDate, |
| | | parentEl : $scope.parentEl !== undefined ? $scope.parentEl : "body", |
| | | locale: { |
| | | format: 'YYYY-MM-DD', |
| | | separator: " ~ ", |
| | | applyLabel: options.applyLabel, |
| | | cancelLabel: options.cancelLabel, |
| | | daysOfWeek: options.daysOfWeek, |
| | | monthNames: options.monthNames |
| | | }, |
| | | opens : "center" |
| | | }); |
| | | if ($attrs["rangeType"] === "date") |
| | | { |
| | | $($element).daterangepicker({ |
| | | timePicker: false, |
| | | autoUpdateInput: true, |
| | | autoApply: true, |
| | | minDate: minDate, |
| | | maxDate: maxDate, |
| | | parentEl: $scope.parentEl !== undefined ? $scope.parentEl : "body", |
| | | locale: { |
| | | format: 'YYYY-MM-DD', |
| | | separator: " ~ ", |
| | | applyLabel: options.applyLabel, |
| | | cancelLabel: options.cancelLabel, |
| | | daysOfWeek: options.daysOfWeek, |
| | | monthNames: options.monthNames |
| | | }, |
| | | opens: "center" |
| | | }); |
| | | } else if ($attrs["rangeType"] === "singleDate") { |
| | | $($element).daterangepicker({ |
| | | timePicker: false, |
| | | autoUpdateInput: true, |
| | | autoApply : true, |
| | | singleDatePicker : true, |
| | | //parentEl : $scope.parentEl !== undefined ? $scope.parentEl : "", |
| | | locale: { |
| | | format: 'YYYY-MM-DD', |
| | | applyLabel: options.applyLabel, |
| | | cancelLabel: options.cancelLabel, |
| | | daysOfWeek: options.daysOfWeek, |
| | | monthNames: options.monthNames |
| | | }, |
| | | opens : "center" |
| | | }); |
| | | } |
| | | } |
| | | else { |
| | | $($element).daterangepicker({ |