lavkach3
1/*******************************************/
2// Basic Date Range Picker
3/*******************************************/
4$(".daterange").daterangepicker();5
6/*******************************************/
7// Date & Time
8/*******************************************/
9$(".datetime").daterangepicker({10timePicker: true,11timePickerIncrement: 30,12locale: {13format: "MM/DD/YYYY h:mm A",14},15});16
17/*******************************************/
18//Calendars are not linked
19/*******************************************/
20$(".timeseconds").daterangepicker({21timePicker: true,22timePickerIncrement: 30,23timePicker24Hour: true,24timePickerSeconds: true,25locale: {26format: "MM-DD-YYYY h:mm:ss",27},28});29
30/*******************************************/
31// Single Date Range Picker
32/*******************************************/
33$(".singledate").daterangepicker({34singleDatePicker: true,35showDropdowns: true,36});37
38/*******************************************/
39// Auto Apply Date Range
40/*******************************************/
41$(".autoapply").daterangepicker({42autoApply: true,43});44
45/*******************************************/
46// Calendars are not linked
47/*******************************************/
48$(".linkedCalendars").daterangepicker({49linkedCalendars: false,50});51
52/*******************************************/
53// Date Limit
54/*******************************************/
55$(".dateLimit").daterangepicker({56dateLimit: {57days: 7,58},59});60
61/*******************************************/
62// Show Dropdowns
63/*******************************************/
64$(".showdropdowns").daterangepicker({65showDropdowns: true,66});67
68/*******************************************/
69// Show Week Numbers
70/*******************************************/
71$(".showweeknumbers").daterangepicker({72showWeekNumbers: true,73});74
75/*******************************************/
76// Date Ranges
77/*******************************************/
78$(".dateranges").daterangepicker({79ranges: {80Today: [moment(), moment()],81Yesterday: [moment().subtract(1, "days"), moment().subtract(1, "days")],82"Last 7 Days": [moment().subtract(6, "days"), moment()],83"Last 30 Days": [moment().subtract(29, "days"), moment()],84"This Month": [moment().startOf("month"), moment().endOf("month")],85"Last Month": [86moment().subtract(1, "month").startOf("month"),87moment().subtract(1, "month").endOf("month"),88],89},90});91
92/*******************************************/
93// Always Show Calendar on Ranges
94/*******************************************/
95$(".shawCalRanges").daterangepicker({96ranges: {97Today: [moment(), moment()],98Yesterday: [moment().subtract(1, "days"), moment().subtract(1, "days")],99"Last 7 Days": [moment().subtract(6, "days"), moment()],100"Last 30 Days": [moment().subtract(29, "days"), moment()],101"This Month": [moment().startOf("month"), moment().endOf("month")],102"Last Month": [103moment().subtract(1, "month").startOf("month"),104moment().subtract(1, "month").endOf("month"),105],106},107alwaysShowCalendars: true,108});109
110/*******************************************/
111// Top of the form-control open alignment
112/*******************************************/
113$(".drops").daterangepicker({114drops: "up", // up/down115});116
117/*******************************************/
118// Custom button options
119/*******************************************/
120$(".buttonClass").daterangepicker({121drops: "up",122buttonClasses: "btn",123applyClass: "btn-primary",124cancelClass: "bg-danger-subtle text-danger",125});126
127/*******************************************/
128// Language
129/*******************************************/
130$(".localeRange").daterangepicker({131ranges: {132"Aujourd'hui": [moment(), moment()],133Hier: [moment().subtract("days", 1), moment().subtract("days", 1)],134"Les 7 derniers jours": [moment().subtract("days", 6), moment()],135"Les 30 derniers jours": [moment().subtract("days", 29), moment()],136"Ce mois-ci": [moment().startOf("month"), moment().endOf("month")],137"le mois dernier": [138moment().subtract("month", 1).startOf("month"),139moment().subtract("month", 1).endOf("month"),140],141},142locale: {143applyLabel: "Vers l'avant",144cancelLabel: "Annulation",145startLabel: "Date initiale",146endLabel: "Date limite",147customRangeLabel: "Sélectionner une date",148daysOfWeek: ["Di", "Lu", "Ma", "Me", "Je", "Ve", "Sa"],149monthNames: [150"Janvier",151"février",152"Mars",153"Avril",154"Маi",155"Juin",156"Juillet",157"Août",158"Septembre",159"Octobre",160"Novembre",161"Decembre",162],163firstDay: 1,164},165});166