diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/Nepali-Multi-Date-Picker.iml b/.idea/Nepali-Multi-Date-Picker.iml new file mode 100644 index 0000000..c956989 --- /dev/null +++ b/.idea/Nepali-Multi-Date-Picker.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..c31699b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml new file mode 100644 index 0000000..f324872 --- /dev/null +++ b/.idea/php.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/nepali-date-picker.js b/nepali-date-picker.js index 3ea85ef..63eac9f 100644 --- a/nepali-date-picker.js +++ b/nepali-date-picker.js @@ -787,98 +787,98 @@ [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], // 2004 [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2005 [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], // 2006 - [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], // 2006 - [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31], // 2007 - [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2008 - [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], // 2009 - [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], // 2010 - [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], - [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], - [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], - [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], - [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], - [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], - [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], - [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], - [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], - [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], - [30, 32, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31], - [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], - [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], - [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], - [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], - [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], - [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], - [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], - [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], - [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], - [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], - [30, 32, 31, 32, 31, 31, 29, 30, 29, 30, 29, 31], - [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], - [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31], - [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], - [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], + [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], // 2007 + [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31], // 2008 + [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2009 + [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], // 2010 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], // 2011 + [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], // 2012 + [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2013 + [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], // 2014 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], // 2015 + [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], // 2016 + [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2017 + [31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30], // 2018 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], // 2019 + [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], // 2020 + [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2021 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], // 2022 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], // 2023 + [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], // 2024 + [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2025 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], // 2026 + [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], // 2027 + [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2028 + [31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30], // 2029 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], // 2030 + [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], // 2031 + [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2032 + [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], // 2033 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], // 2034 + [30, 32, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31], // 2035 + [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2036 + [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], // 2037 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], // 2038 + [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], // 2039 + [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2040 + [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], // 2041 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], // 2042 + [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], // 2043 + [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2044 + [31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30], // 2045 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], // 2046 + [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], // 2047 + [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2048 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], // 2049 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], // 2050 + [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], // 2051 + [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2052 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], // 2053 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], // 2054 + [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2055 + [31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30], // 2056 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], // 2057 + [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], // 2058 + [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2059 + [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], // 2060 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], // 2061 + [30, 32, 31, 32, 31, 31, 29, 30, 29, 30, 29, 31], // 2062 + [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2063 + [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], // 2064 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], // 2065 + [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31], // 2066 + [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2067 + [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], // 2068 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], // 2069 + [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], // 2070 [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], //2071 [31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30], //2072 [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], //2073 - [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], + [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], // 2074 + [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2075 [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], // 2076 - [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], - [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], - [31, 31, 32, 32, 31, 30, 30, 30, 29, 30, 30, 30], - [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], - [31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30], - [31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30], - [31, 32, 31, 32, 30, 31, 30, 30, 29, 30, 30, 30], - [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], - [31, 31, 32, 31, 31, 31, 30, 30, 29, 30, 30, 30], - [30, 31, 32, 32, 30, 31, 30, 30, 29, 30, 30, 30], - [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], + [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], // 2077 + [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], // 2078 + [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], // 2079 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], // 2080 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], // 2081 + [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], // 2082 + [31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30], // 2083 + [31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30], // 2084 + [31, 32, 31, 32, 30, 31, 30, 30, 29, 30, 30, 30], // 2085 + [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], // 2086 + [31, 31, 32, 31, 31, 31, 30, 30, 29, 30, 30, 30], // 2087 + [30, 31, 32, 32, 30, 31, 30, 30, 29, 30, 30, 30], // 2088 + [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], // 2089 [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], //2090 - [31, 31, 32, 31, 31, 31, 30, 30, 29, 30, 30, 30], - [30, 31, 32, 32, 31, 30, 30, 30, 29, 30, 30, 30], - [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], - [31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30], - [31, 31, 32, 31, 31, 31, 30, 29, 30, 30, 30, 30], - [30, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], - [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], - [31, 31, 32, 31, 31, 31, 29, 30, 29, 30, 29, 31], + [31, 31, 32, 31, 31, 31, 30, 30, 29, 30, 30, 30], // 2091 + [30, 31, 32, 32, 31, 30, 30, 30, 29, 30, 30, 30], // 2092 + [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], // 2093 + [31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30], // 2094 + [31, 31, 32, 31, 31, 31, 30, 29, 30, 30, 30, 30], // 2095 + [30, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], // 2096 + [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], // 2097 + [31, 31, 32, 31, 31, 31, 29, 30, 29, 30, 29, 31], // 2098 [31, 31, 32, 31, 31, 31, 30, 29, 29, 30, 30, 30] //2099 ]; diff --git a/nepali-date-picker.min.css b/nepali-date-picker.min.css index b3211d9..2302424 100644 --- a/nepali-date-picker.min.css +++ b/nepali-date-picker.min.css @@ -1 +1 @@ -.andp-date-picker{cursor:text}.andp-date-picker:not(:empty){height:inherit}.andp-date-picker span{background:#e8e8e8;display:inline-block;margin:0 1px 1px;border-radius:4px;padding:2px 10px}.andp-datepicker-container{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";width:256px;overflow:hidden;position:absolute;z-index:1000;background:#fff}.andp-body{padding:0 8px 8px;border:solid 1px #ccc;border-top:0}.andp-header{background:#2a5acc;padding:10px 0}.andp-header select{padding:6px 5px;border:0;font-size:14px;box-sizing:border-box}.andp-month-select{margin-right:5px;width:96px}.andp-year-select{width:65px}.andp-header button{background:0 0;border:0;color:#fff;padding:0;cursor:pointer;font-weight:700;margin-top:0;font-size:20px;box-sizing:border-box;width:45px;text-align:center;outline:0!important}.andp-prev{float:left}.andp-next{float:right}.andp-days-names div{width:34px;float:left;text-align:center;font-size:12px;color:#2a5acc;padding:10px 0}.andp-days-numbers{display:table;border-collapse:collapse;user-select:none}.andp-column{display:table-row}.andp-column div{display:table-cell;border:1px solid #f1f1f1;width:34px;height:28px;box-sizing:border-box;text-align:center;vertical-align:middle;font-size:12px;color:#000}.andp-column div.day{cursor:pointer}.andp-column .old-dates{color:#d2d2d2}.andp-column div.selected{background:#2a5acc!important;color:#fff;border-color:#2a5acc!important}.andp-column div.soft-select{background:#dedede;border-color:#dedede}.andp-info{font-size:12px;margin-top:9px}.andp-action-btns{text-align:right;margin-top:7px}.andp-action-btns button{background:#28a745;border:0;color:#fff;font-size:12px;padding:5px 10px;display:inline-block;margin-left:7px;cursor:pointer} \ No newline at end of file +.andp-date-picker{cursor:text}.andp-date-picker:not(:empty){height:inherit}.andp-date-picker span{background:#e8e8e8;display:inline-block;margin:0 1px 1px;border-radius:4px;padding:2px 10px}.andp-datepicker-container{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";width:256px;overflow:hidden;position:absolute;z-index:1000;background:#fff}.andp-body{padding:0 8px 8px;border:1px solid #ccc;border-top:0}.andp-header{background:#2a5acc;padding:10px 0}.andp-header select{padding:6px 5px;border:0;font-size:14px;box-sizing:border-box}.andp-month-select{margin-right:5px;width:96px}.andp-year-select{width:65px}.andp-header button{background:0 0;border:0;color:#fff;padding:0;cursor:pointer;font-weight:700;margin-top:0;font-size:20px;box-sizing:border-box;width:45px;text-align:center;outline:0!important}.andp-column div,.andp-days-names div{width:34px;text-align:center;font-size:12px}.andp-prev{float:left}.andp-next{float:right}.andp-days-names div{float:left;color:#2a5acc;padding:10px 0}.andp-days-numbers{display:table;border-collapse:collapse;user-select:none}.andp-column{display:table-row}.andp-column div{display:table-cell;border:1px solid #f1f1f1;height:28px;box-sizing:border-box;vertical-align:middle;color:#000}.andp-column div.day{cursor:pointer}.andp-column .old-dates{color:#d2d2d2}.andp-column div.selected{background:#2a5acc!important;color:#fff;border-color:#2a5acc!important}.andp-column div.soft-select{background:#dedede;border-color:#dedede}.andp-info{font-size:12px;margin-top:9px}.andp-action-btns{text-align:right;margin-top:7px}.andp-action-btns button{background:#28a745;border:0;color:#fff;font-size:12px;padding:5px 10px;display:inline-block;margin-left:7px;cursor:pointer} diff --git a/nepali-date-picker.min.js b/nepali-date-picker.min.js index 82cc050..ac0cc55 100644 --- a/nepali-date-picker.min.js +++ b/nepali-date-picker.min.js @@ -1 +1 @@ -(function(e){function t(e){let t=e.split("-"),a=t[0]+"-";return a+=1==t[1].length?"0"+t[1]:t[1],a+="-",a+=1==t[2].length?"0"+t[2]:t[2],a}function a(){let t=b.length;if(t<1)e(".andp-datepicker-container").removeClass("open").hide();else{if(b=b.sort(function(e,t){return e=e.split("/").reverse().join(""),t=t.split("/").reverse().join(""),e>t?1:e"+b.join("")+"":t>1?t+" dates selected":b[0],j.is(":input")?j.attr("value",a).val(a):j.html(a)}e(".andp-datepicker-container").removeClass("open").hide(),selected_date=e(this).data("date")}}function n(t){e(".andp-datepicker-container").removeClass("open").hide();var a=e('.andp-datepicker-container[data-cal_id="'+y+'"]');if(a.length>0)return w=a.find(".andp-year-select"),C=a.find(".andp-month-select"),N=a.find(".andp-days-numbers"),a.addClass("open").show(),void s();var n='';for(n+='',n+=' ❮ ',n+=' ',n+=' ',n+=' ❯ ',n+="",n+='',n+=' SUN MON TUE WED THU FRI SAT ',n+=' ',E||(control_key="mac"==T?"CMD":"CTRL",n+=' Press '+control_key+" or Shift key for multiple selection "),n+='',E||(n+='Apply'),n+="",n+="",n+="",_.append(n),a=e('.andp-datepicker-container[data-cal_id="'+y+'"]'),w=a.find(".andp-year-select"),C=a.find(".andp-month-select"),N=a.find(".andp-days-numbers"),append_html=' Baisakh ",append_html+=' Jestha ",append_html+=' Asar ",append_html+=' Shrawan ",append_html+=' Bhadra ",append_html+=' Ashoj ",append_html+=' Kartik ",append_html+=' Mangsir ",append_html+=' Poush ",append_html+=' Magh ",append_html+=' Falgun ",append_html+=' Chaitra ",C.append(append_html),i=k;i<=Y;i++)append_html='"+i+"",w.append(append_html);l(),e('.andp-datepicker-container[data-cal_id="'+y+'"]').addClass("open"),s()}function s(){var t=j.offset(),a=j.outerHeight(),n=e(window).width(),i=j.outerWidth(),s=e(".andp-datepicker-container").outerWidth();if(s+t.left+10>n){var l=n-(t.left+i);e('.andp-datepicker-container[data-cal_id="'+y+'"]').css({top:t.top+a,right:l,left:"inherit"})}else e('.andp-datepicker-container[data-cal_id="'+y+'"]').css({top:t.top+a,left:t.left,right:"inherit"})}function l(){month=C.val(),year=w.val(),N.html("");var e=new u;e.setNepaliDate(year,month,1);var t=e.getDay(),a=d(year,month);append_html="";var n=1,s=1,l=parseInt(t)-2,o=1;for(i=1;i<=42;i++){last_month=parseInt(month)-1,last_year=parseInt(year),last_month<1&&(last_month=12,last_year-=1,last_year'),i '+parseInt(h-l)+" ",l-=1;else if(s<=a){let e=s<10?"0"+s:s,t=year+"-"+month+"-"+e,a=b.indexOf(t);append_html+=''+s+"",s++}else append_html+=' '+o+"",o++;7==n&&(append_html+="",n=0),n++}N.append(append_html)}function d(e,t){var a=new u;if(!(eY||t<1||t>12)){e=e-k,t=t-1;return a.nepaliMonths[e][t]}}function o(e,t){e=e.split("-"),t=t.split("-");var a=new u;return a.setNepaliDate(e[0],e[1],e[2]),a.getNepaliDateDifference(t[0],t[1],t[2])}function h(e,t){e=e.split("-"),t=t.split("-");var a=new u;a.setNepaliDate(e[0],e[1],e[2]);var n=[a.getEnglishYear(),a.getEnglishMonth(),a.getEnglishDate()];a.setNepaliDate(t[0],t[1],t[2]);var i=[a.getEnglishYear(),a.getEnglishMonth(),a.getEnglishDate()],s=new Date(n[0],n[1],n[2]),l=new Date(i[0],i[1],i[2]);return s>l&&1}function r(e){e=e.split("-"),year=parseInt(e[0]),month=parseInt(e[1]);var t=parseInt(d(year,month));return day=parseInt(e[2])+1,day>t&&(day=1,month+=1,month>12&&(month=1,year+=1)),year+"-"+month+"-"+day}function p(a,n=!1){a=t(a);var i=b.indexOf(a),s=e('.andp-datepicker-container[data-cal_id="'+y+'"]'),l=s.find('.day[data-date="'+a+'"]');n?l.addClass("soft-select"):i<0?(b.push(a),l.addClass("selected")):(b.splice(i,1),l.removeClass("selected"))}function c(e){L.append('')}function u(){this.englishMonths=[31,28,31,30,31,30,31,31,30,31,30,31],this.englishLeapMonths=[31,29,31,30,31,30,31,31,30,31,30,31],this.nepaliMonths=[[30,32,31,32,31,30,30,30,29,30,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[30,32,31,32,31,30,30,30,29,30,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[31,31,31,32,31,31,29,30,30,29,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[31,31,31,32,31,31,29,30,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[31,31,31,32,31,31,29,30,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,32,31,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,30,29,31],[31,31,31,32,31,31,30,29,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,30],[31,32,31,32,31,30,30,30,29,30,29,31],[31,31,31,32,31,31,30,29,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[30,32,31,32,31,30,30,30,29,30,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,31,32,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[30,32,31,32,31,30,30,30,29,30,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[30,32,31,32,31,31,29,30,30,29,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[31,31,31,32,31,31,29,30,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[31,31,31,32,31,31,29,30,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,32,31,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[31,31,31,32,31,31,30,29,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,30],[31,32,31,32,31,30,30,30,29,30,29,31],[31,31,31,32,31,31,30,29,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,30],[31,32,31,32,31,30,30,30,29,30,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,31,32,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[30,32,31,32,31,30,30,30,29,30,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[30,32,31,32,31,31,29,30,29,30,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[31,31,31,32,31,31,29,30,30,29,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[31,31,31,32,31,31,29,30,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,32,31,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[31,31,31,32,31,31,30,29,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,30],[31,32,31,32,31,30,30,30,29,30,29,31],[31,31,31,32,31,31,30,29,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,30],[31,31,32,32,31,30,30,30,29,30,30,30],[30,32,31,32,31,30,30,30,29,30,30,30],[31,31,32,31,31,30,30,30,29,30,30,30],[31,31,32,31,31,30,30,30,29,30,30,30],[31,32,31,32,30,31,30,30,29,30,30,30],[30,32,31,32,31,30,30,30,29,30,30,30],[31,31,32,31,31,31,30,30,29,30,30,30],[30,31,32,32,30,31,30,30,29,30,30,30],[30,32,31,32,31,30,30,30,29,30,30,30],[30,32,31,32,31,30,30,30,29,30,30,30],[31,31,32,31,31,31,30,30,29,30,30,30],[30,31,32,32,31,30,30,30,29,30,30,30],[30,32,31,32,31,30,30,30,29,30,30,30],[31,31,32,31,31,30,30,30,29,30,30,30],[31,31,32,31,31,31,30,29,30,30,30,30],[30,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,30,30,30],[31,31,32,31,31,31,29,30,29,30,29,31],[31,31,32,31,31,31,30,29,29,30,30,30]],this.setCurrentDate=function(){var e=new Date;this.setEnglishDate(e.getFullYear(),e.getMonth()+1,e.getDate())},this.setEnglishDate=function(e,t,a){if(!this.isEnglishRange(e,t,a))throw new Exception("Invalid date format.");this.englishYear=e,this.englishMonth=t,this.englishDate=a,this.nepaliYear=2e3,this.nepaliMonth=1,this.nepaliDate=1;for(var n=this.getEnglishDateDifference(1943,4,14),i=0;n>=this.nepaliYearDays(i);)this.nepaliYear++,n-=this.nepaliYearDays(i),i++;for(var s=0;n>=this.nepaliMonths[i][s];)n-=this.nepaliMonths[i][s],this.nepaliMonth++,s++;this.nepaliDate=this.nepaliDate+n,this.getDay()},this.toEnglishString=function(e){return void 0===e&&(e="-"),this.englishYear+e+this.englishMonth+e+this.englishDate},this.getEnglishDateDifference=function(e,t,a){var n=this.countTotalEnglishDays(this.englishYear,this.englishMonth,this.englishDate)-this.countTotalEnglishDays(e,t,a);return n<0?-n:n},this.countTotalEnglishDays=function(e,t,a){for(var n=365*e+a,i=0;i2042)&&(!(t<1||t>12)&&!(a<1||a>31))},this.isLeapYear=function(e){return e%4==0&&(e%100!=0||e%400==0)},this.setNepaliDate=function(e,t,a){if(this.isNepaliRange(e,t,a)){this.nepaliYear=e,this.nepaliMonth=t,this.nepaliDate=a,this.englishYear=1944,this.englishMonth=1,this.englishDate=1;for(var n=this.getNepaliDateDifference(2e3,9,17);n>=(this.isLeapYear(this.englishYear)?366:365);)n-=this.isLeapYear(this.englishYear)?366:365,this.englishYear++;for(var i=this.isLeapYear(this.englishYear)?this.englishLeapMonths:this.englishMonths,s=0;n>=i[s];)this.englishMonth++,n-=i[s],s++;this.englishDate=this.englishDate+n,this.getDay()}else console.log("Invalid Date Format")},this.toNepaliString=function(e){return void 0===e&&(e="-"),this.nepaliYear+e+this.nepaliMonth+e+this.nepaliDate},this.getNepaliDateDifference=function(e,t,a){var n=this.countTotalNepaliDays(this.nepaliYear,this.nepaliMonth,this.nepaliDate)-this.countTotalNepaliDays(e,t,a);return n<0?-n:n},this.countTotalNepaliDays=function(e,t,a){var n=0;if(e<2e3)return 0;n+=a-1;for(var i=e-2e3,s=0;s2098)&&(!(t<1||t>12)&&!(a<1||a>this.nepaliMonths[e-2e3][t-1]))},this.getDay=function(){var e=this.getEnglishDateDifference(1943,4,14);return this.weekDay=(3+e%7)%7+1,this.weekDay},this.getEnglishYear=function(){return this.englishYear},this.getEnglishMonth=function(){return this.englishMonth},this.getEnglishDate=function(){return this.englishDate},this.getNepaliYear=function(){return this.nepaliYear},this.getNepaliMonth=function(){return this.nepaliMonth},this.getNepaliDate=function(){return this.nepaliDate}}var _=e("body"),f=new u;f.setCurrentDate();let g=f.nepaliYear+"-"+f.nepaliMonth+"-"+f.nepaliDate;e("form").attr("autocomplete","off");var v,m=1,y="",D=f.getNepaliYear(),M=f.getNepaliMonth(),k=2e3,Y=2098,E=0,w="",C="",N="",b=[],I="",x="",T="win",j="",L="";e.fn.nepaliDatePicker=function(){navigator.platform.toUpperCase().indexOf("MAC")>=0&&(T="mac"),e(this).each(function(){let t=e(this);e(this).attr("data-cal_id","cal-"+m),m++,e(this).addClass("andp-date-picker");var a=e.trim(e(this).attr("value"));let n=e(this).data("single");if(E=1==n||1==n?1:0,a&&!E){L=e(this).parents("form"),y=e(this).data("cal_id"),x=e(this).attr("name");let n=a.split(",");if(n.forEach(function(e,t){c(e.trim())}),1!=e(this).data("show_all_dates"))n.length>1?output_msg=n.length+" dates selected":output_msg=n[0],e(this).attr("value",output_msg);else if(!t.is("input")){let e=a.split(","),n=""+e.join("")+"";t.append(n)}}}),e(this).click(function(){if(v=this,b=[],j=e(this),data_single=e(this).data("single"),E=1==data_single||1==data_single?1:0,y=e(this).data("cal_id"),n(this),E)selected_date=t(e(this).val()),selected_date.length>0?(older_date_ar=selected_date.split("-"),C.val(older_date_ar[1]).change(),w.val(older_date_ar[0]).change(),p(selected_date)):p(g,!0);else{L=e(this).parents("form"),x=e(this).attr("name"),x?e(this).removeAttr("name","").attr("data-name",x):x=e(this).attr("data-name");var a=e('input.andp-hidden-dates[data-cal_id="'+y+'"]'),i=a.length;if(i>0)if(1==i)selected_date=t(a.eq(0).val()),older_date_ar=selected_date.split("-"),C.val(older_date_ar[1]).change(),w.val(older_date_ar[0]).change(),p(selected_date);else{older_date=e('input.andp-hidden-dates[data-cal_id="'+y+'"]');let n=older_date.length;older_date=t(older_date.eq(n-1).val()),older_date&&older_date.length>0&&(older_date_ar=older_date.split("-"),C.val(older_date_ar[1]).change(),w.val(older_date_ar[0]).change()),a.each(function(){let a=t(e(this).val());p(a)})}else p(g,!0)}}),_.on("change",".andp-month-select, .andp-year-select",function(){l()})},_.on("click",".andp-datepicker-container.open .andp-change-months",function(t){selected_month=parseInt(C.val()),selected_year=parseInt(w.val()),e(this).hasClass("andp-next")?(selected_month+=1,selected_month>12&&(selected_month=1,selected_year+=1,selected_year>Y&&(selected_year=Y,selected_month=12))):(selected_month-=1,selected_month<1&&(selected_month=12,selected_year-=1,selected_year0){selected_date=e(this).data("date"),I=b[s-1];var l=h(selected_date,I)?I:selected_date,d=l,c=o(selected_date,I);for(b=[],n.find(".andp-column .day").removeClass("selected"),p(d),i=1;i<=c;i++)d=r(d),p(d)}}else t.ctrlKey||t.metaKey?p(selected_date):(b=[],n.find(".andp-column .day").removeClass("selected"),p(selected_date),n.find(".andp-info").show());e("document").trigger("andp_date_selected",[b,v])}),_.on("click",function(t){var a=e(".andp-datepicker-container, .andp-date-picker");a.is(t.target)||0!==a.has(t.target).length||e(".andp-datepicker-container").removeClass("open").hide()}),_.on("click",".andp-datepicker-container.open .apply-date",function(){a()})})(jQuery); \ No newline at end of file +!function(t){var e,$=t("body"),a=new w;a.setCurrentDate();let _=a.nepaliYear+"-"+a.nepaliMonth+"-"+a.nepaliDate;t("form").attr("autocomplete","off");var n=1,s="",l=a.getNepaliYear(),o=a.getNepaliMonth(),h=0,d="",r="",p="",c=[],u="",f="",v="win",g="",D="";function m(t){let e=t.split("-"),$=e[0]+"-";return $+=1==e[1].length?"0"+e[1]:e[1],$+="-",$+=1==e[2].length?"0"+e[2]:e[2]}function y(){let e=c.length;if(e<1){t(".andp-datepicker-container").removeClass("open").hide();return}if(c=c.sort(function(t,e){return(t=t.split("/").reverse().join(""))>(e=e.split("/").reverse().join(""))?1:t"+c.join("")+"":e>1?e+" dates selected":c[0],g.is(":input")?g.attr("value",$).val($):g.html($)}t(".andp-datepicker-container").removeClass("open").hide(),selected_date=t(this).data("date")}function M(){var e=g.offset(),$=g.outerHeight(),a=t(window).width(),_=g.outerWidth();if(t(".andp-datepicker-container").outerWidth()+e.left+10>a){var n=a-(e.left+_);t('.andp-datepicker-container[data-cal_id="'+s+'"]').css({top:e.top+$,right:n,left:"inherit"})}else t('.andp-datepicker-container[data-cal_id="'+s+'"]').css({top:e.top+$,left:e.left,right:"inherit"})}function k(){month=r.val(),year=d.val(),p.html("");var t=new w;t.setNepaliDate(year,month,1);var e=t.getDay(),$=Y(year,month);append_html="";var a=1,_=1,n=parseInt(e)-2,s=1;for(i=1;i<=42;i++){last_month=parseInt(month)-1,last_year=parseInt(year),last_month<1&&(last_month=12,(last_year-=1)<2e3&&(last_year=2e3,last_month=1)),next_month=parseInt(month)+1,next_year=parseInt(year);var l=Y(last_year,last_month);if(1==a&&(append_html+=''),i '+parseInt(l-n)+" ",n-=1;else if(_<=$){let o=year+"-"+month+"-"+(_<10?"0"+_:_);append_html+=''+_+"",_++}else append_html+=' '+s+"",s++;7==a&&(append_html+="",a=0),a++}p.append(append_html)}function Y(t,e){var $=new w;if(!(t<2e3)&&!(t>2098)&&!(e<1)&&!(e>12)){var t=t-2e3,e=e-1;return $.nepaliMonths[t][e]}}function E(t){year=parseInt((t=t.split("-"))[0]),month=parseInt(t[1]);var e=parseInt(Y(year,month));return(day=parseInt(t[2])+1)>e&&(day=1,(month+=1)>12&&(month=1,year+=1)),year+"-"+month+"-"+day}function C(e,$=!1){e=m(e);var a=c.indexOf(e),_=t('.andp-datepicker-container[data-cal_id="'+s+'"]').find('.day[data-date="'+e+'"]');$?_.addClass("soft-select"):a<0?(c.push(e),_.addClass("selected")):(c.splice(a,1),_.removeClass("selected"))}function N(t){D.append('')}function w(){this.englishMonths=[31,28,31,30,31,30,31,31,30,31,30,31],this.englishLeapMonths=[31,29,31,30,31,30,31,31,30,31,30,31],this.nepaliMonths=[[30,32,31,32,31,30,30,30,29,30,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[30,32,31,32,31,30,30,30,29,30,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[31,31,31,32,31,31,29,30,30,29,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[31,31,31,32,31,31,29,30,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[31,31,31,32,31,31,29,30,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,32,31,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,30,29,31],[31,31,31,32,31,31,30,29,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,30],[31,32,31,32,31,30,30,30,29,30,29,31],[31,31,31,32,31,31,30,29,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[30,32,31,32,31,30,30,30,29,30,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,31,32,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[30,32,31,32,31,30,30,30,29,30,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[30,32,31,32,31,31,29,30,30,29,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[31,31,31,32,31,31,29,30,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[31,31,31,32,31,31,29,30,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,32,31,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[31,31,31,32,31,31,30,29,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,30],[31,32,31,32,31,30,30,30,29,30,29,31],[31,31,31,32,31,31,30,29,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,30],[31,32,31,32,31,30,30,30,29,30,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,31,32,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[30,32,31,32,31,30,30,30,29,30,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[30,32,31,32,31,31,29,30,29,30,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[31,31,31,32,31,31,29,30,30,29,29,31],[31,31,32,31,31,31,30,29,30,29,30,30],[31,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[31,31,31,32,31,31,29,30,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,32,31,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,31],[31,31,31,32,31,31,30,29,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,30],[31,32,31,32,31,30,30,30,29,30,29,31],[31,31,31,32,31,31,30,29,30,29,30,30],[31,31,32,31,31,31,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,29,30,30],[31,32,31,32,31,30,30,30,29,30,29,31],[30,32,31,32,31,30,30,30,29,30,30,30],[31,31,32,31,31,30,30,30,29,30,30,30],[31,31,32,31,31,30,30,30,29,30,30,30],[31,32,31,32,30,31,30,30,29,30,30,30],[30,32,31,32,31,30,30,30,29,30,30,30],[31,31,32,31,31,31,30,30,29,30,30,30],[30,31,32,32,30,31,30,30,29,30,30,30],[30,32,31,32,31,30,30,30,29,30,30,30],[30,32,31,32,31,30,30,30,29,30,30,30],[31,31,32,31,31,31,30,30,29,30,30,30],[30,31,32,32,31,30,30,30,29,30,30,30],[30,32,31,32,31,30,30,30,29,30,30,30],[31,31,32,31,31,30,30,30,29,30,30,30],[31,31,32,31,31,31,30,29,30,30,30,30],[30,31,32,32,31,30,30,29,30,29,30,30],[31,32,31,32,31,30,30,30,29,30,30,30],[31,31,32,31,31,31,29,30,29,30,29,31],[31,31,32,31,31,31,30,29,29,30,30,30]],this.setCurrentDate=function(){var t=new Date;this.setEnglishDate(t.getFullYear(),t.getMonth()+1,t.getDate())},this.setEnglishDate=function(t,e,$){if(!this.isEnglishRange(t,e,$))throw new Exception("Invalid date format.");this.englishYear=t,this.englishMonth=e,this.englishDate=$,this.nepaliYear=2e3,this.nepaliMonth=1,this.nepaliDate=1;for(var a=this.getEnglishDateDifference(1943,4,14),_=0;a>=this.nepaliYearDays(_);)this.nepaliYear++,a-=this.nepaliYearDays(_),_++;for(var n=0;a>=this.nepaliMonths[_][n];)a-=this.nepaliMonths[_][n],this.nepaliMonth++,n++;this.nepaliDate=this.nepaliDate+a,this.getDay()},this.toEnglishString=function(t){return void 0===t&&(t="-"),this.englishYear+t+this.englishMonth+t+this.englishDate},this.getEnglishDateDifference=function(t,e,$){var a=this.countTotalEnglishDays(this.englishYear,this.englishMonth,this.englishDate)-this.countTotalEnglishDays(t,e,$);return a<0?-a:a},this.countTotalEnglishDays=function(t,e,$){for(var a=365*t+$,_=0;_2042)&&!(e<1)&&!(e>12)&&!($<1)&&!($>31)},this.isLeapYear=function(t){return t%4==0&&(t%100!=0||t%400==0)},this.setNepaliDate=function(t,e,$){if(!this.isNepaliRange(t,e,$)){console.log("Invalid Date Format");return}this.nepaliYear=t,this.nepaliMonth=e,this.nepaliDate=$,this.englishYear=1944,this.englishMonth=1,this.englishDate=1;for(var a=this.getNepaliDateDifference(2e3,9,17);a>=(this.isLeapYear(this.englishYear)?366:365);)a-=this.isLeapYear(this.englishYear)?366:365,this.englishYear++;for(var _=this.isLeapYear(this.englishYear)?this.englishLeapMonths:this.englishMonths,n=0;a>=_[n];)this.englishMonth++,a-=_[n],n++;this.englishDate=this.englishDate+a,this.getDay()},this.toNepaliString=function(t){return void 0===t&&(t="-"),this.nepaliYear+t+this.nepaliMonth+t+this.nepaliDate},this.getNepaliDateDifference=function(t,e,$){var a=this.countTotalNepaliDays(this.nepaliYear,this.nepaliMonth,this.nepaliDate)-this.countTotalNepaliDays(t,e,$);return a<0?-a:a},this.countTotalNepaliDays=function(t,e,$){var a=0;if(t<2e3)return 0;a+=$-1;for(var _=t-2e3,n=0;n2098)&&!(e<1)&&!(e>12)&&!($<1)&&!($>this.nepaliMonths[t-2e3][e-1])},this.getDay=function(){var t=this.getEnglishDateDifference(1943,4,14);return this.weekDay=(3+t%7)%7+1,this.weekDay},this.getEnglishYear=function(){return this.englishYear},this.getEnglishMonth=function(){return this.englishMonth},this.getEnglishDate=function(){return this.englishDate},this.getNepaliYear=function(){return this.nepaliYear},this.getNepaliMonth=function(){return this.nepaliMonth},this.getNepaliDate=function(){return this.nepaliDate}}t.fn.nepaliDatePicker=function(){navigator.platform.toUpperCase().indexOf("MAC")>=0&&(v="mac"),t(this).each(function(){let e=t(this);t(this).attr("data-cal_id","cal-"+n),n++,t(this).addClass("andp-date-picker");var $=t.trim(t(this).attr("value"));let a=t(this).data("single");if(h=!0==a||1==a?1:0,$&&!h){D=t(this).parents("form"),s=t(this).data("cal_id"),f=t(this).attr("name");let _=$.split(",");if(_.forEach(function(t,e){N(t.trim())}),!0!=t(this).data("show_all_dates"))output_msg=_.length>1?_.length+" dates selected":_[0],t(this).attr("value",output_msg);else if(!e.is("input")){let l=""+$.split(",").join("")+"";e.append(l)}}}),t(this).click(function(){if(e=this,c=[],g=t(this),h=!0==(data_single=t(this).data("single"))||1==data_single?1:0,s=t(this).data("cal_id"),function e(a){t(".andp-datepicker-container").removeClass("open").hide();var _=t('.andp-datepicker-container[data-cal_id="'+s+'"]');if(_.length>0){d=_.find(".andp-year-select"),r=_.find(".andp-month-select"),p=_.find(".andp-days-numbers"),_.addClass("open").show(),M();return}var n='';for(n+='',n+=' ❮ ',n+=' ',n+=' ',n+=' ❯ ',n+="",n+='',n+=' SUN MON TUE WED THU FRI SAT ',n+=' ',h||(n+=' Press '+(control_key="mac"==v?"CMD":"CTRL")+" or Shift key for multiple selection "),n+='',h||(n+='Apply'),n+="",n+="",n+="",$.append(n),d=(_=t('.andp-datepicker-container[data-cal_id="'+s+'"]')).find(".andp-year-select"),r=_.find(".andp-month-select"),p=_.find(".andp-days-numbers"),append_html=' Baisakh ",append_html+=' Jestha ",append_html+=' Asar ",append_html+=' Shrawan ",append_html+=' Bhadra ",append_html+=' Ashoj ",append_html+=' Kartik ",append_html+=' Mangsir ",append_html+=' Poush ",append_html+=' Magh ",append_html+=' Falgun ",append_html+=' Chaitra ",r.append(append_html),i=2e3;i<=2098;i++)append_html='"+i+"",d.append(append_html);k(),t('.andp-datepicker-container[data-cal_id="'+s+'"]').addClass("open"),M()}(this),h)(selected_date=m(t(this).val())).length>0?(older_date_ar=selected_date.split("-"),r.val(older_date_ar[1]).change(),d.val(older_date_ar[0]).change(),C(selected_date)):C(_,!0);else{D=t(this).parents("form"),(f=t(this).attr("name"))?t(this).removeAttr("name","").attr("data-name",f):f=t(this).attr("data-name");var a=t('input.andp-hidden-dates[data-cal_id="'+s+'"]'),n=a.length;if(n>0){if(1==n)older_date_ar=(selected_date=m(a.eq(0).val())).split("-"),r.val(older_date_ar[1]).change(),d.val(older_date_ar[0]).change(),C(selected_date);else{let u=(older_date=t('input.andp-hidden-dates[data-cal_id="'+s+'"]')).length;(older_date=m(older_date.eq(u-1).val()))&&older_date.length>0&&(older_date_ar=older_date.split("-"),r.val(older_date_ar[1]).change(),d.val(older_date_ar[0]).change()),a.each(function(){C(m(t(this).val()))})}}else C(_,!0)}}),$.on("change",".andp-month-select, .andp-year-select",function(){k()})},$.on("click",".andp-datepicker-container.open .andp-change-months",function(e){selected_month=parseInt(r.val()),selected_year=parseInt(d.val()),t(this).hasClass("andp-next")?(selected_month+=1)>12&&(selected_month=1,(selected_year+=1)>2098&&(selected_year=2098,selected_month=12)):(selected_month-=1)<1&&(selected_month=12,(selected_year-=1)<2e3&&(selected_year=2e3,selected_month=1)),selected_month<10&&(selected_month="0"+selected_month),selected_year<10&&(selected_year="0"+selected_year),r.val(selected_month).change(),d.val(selected_year).change()}),$.on("click",".andp-datepicker-container.open .andp-days-numbers .day",function($){selected_day=t(this).text(),selected_date=t(this).data("date");var a=t('.andp-datepicker-container[data-cal_id="'+s+'"]');if(h)c=[],a.find(".andp-column .day").removeClass("selected"),C(selected_date),a.find(".andp-info").hide(),y();else if($.shiftKey){var _=c.length;if(_>0){var n,l,o,d,r,p,f,v,g,D,m=(n=selected_date=t(this).data("date"),l=u=c[_-1],n=n.split("-"),l=l.split("-"),o=new w,o.setNepaliDate(n[0],n[1],n[2]),d=[o.getEnglishYear(),o.getEnglishMonth(),o.getEnglishDate()],o.setNepaliDate(l[0],l[1],l[2]),r=[o.getEnglishYear(),o.getEnglishMonth(),o.getEnglishDate()],p=new Date(d[0],d[1],d[2]),f=new Date(r[0],r[1],r[2]),p>f)?u:selected_date,M=(v=selected_date,g=u,v=v.split("-"),g=g.split("-"),D=new w,D.setNepaliDate(v[0],v[1],v[2]),D.getNepaliDateDifference(g[0],g[1],g[2]));for(c=[],a.find(".andp-column .day").removeClass("selected"),C(m),i=1;i<=M;i++)C(m=E(m))}}else $.ctrlKey||$.metaKey?C(selected_date):(c=[],a.find(".andp-column .day").removeClass("selected"),C(selected_date),a.find(".andp-info").show());t("document").trigger("andp_date_selected",[c,e])}),$.on("click",function(e){var $=t(".andp-datepicker-container, .andp-date-picker");$.is(e.target)||0!==$.has(e.target).length||t(".andp-datepicker-container").removeClass("open").hide()}),$.on("click",".andp-datepicker-container.open .apply-date",function(){y()})}(jQuery);