├── .browserslistrc ├── assets ├── demo1.PNG ├── demo2.PNG ├── demo3.PNG ├── demo4.PNG ├── demo5.PNG └── demo6.PNG ├── dev ├── serve.js └── serve.vue ├── babel.config.js ├── .gitignore ├── .github └── workflows │ ├── webpack.yml │ └── npm-publish.yml ├── src ├── entry.js ├── constants.js └── v-nepalidatepicker.vue ├── package.json └── README.md /.browserslistrc: -------------------------------------------------------------------------------- 1 | current node 2 | last 2 versions and > 2% 3 | ie > 10 4 | -------------------------------------------------------------------------------- /assets/demo1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krijanniroula/v-nepalidatepicker/HEAD/assets/demo1.PNG -------------------------------------------------------------------------------- /assets/demo2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krijanniroula/v-nepalidatepicker/HEAD/assets/demo2.PNG -------------------------------------------------------------------------------- /assets/demo3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krijanniroula/v-nepalidatepicker/HEAD/assets/demo3.PNG -------------------------------------------------------------------------------- /assets/demo4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krijanniroula/v-nepalidatepicker/HEAD/assets/demo4.PNG -------------------------------------------------------------------------------- /assets/demo5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krijanniroula/v-nepalidatepicker/HEAD/assets/demo5.PNG -------------------------------------------------------------------------------- /assets/demo6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/krijanniroula/v-nepalidatepicker/HEAD/assets/demo6.PNG -------------------------------------------------------------------------------- /dev/serve.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Dev from './serve.vue'; 3 | 4 | Vue.config.productionTip = false; 5 | 6 | new Vue({ 7 | render: (h) => h(Dev), 8 | }).$mount('#app'); 9 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | const devPresets = ['@vue/babel-preset-app']; 2 | const buildPresets = ['@babel/preset-env']; 3 | module.exports = { 4 | presets: (process.env.NODE_ENV === 'development' ? devPresets : buildPresets), 5 | }; 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | -------------------------------------------------------------------------------- /dev/serve.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /.github/workflows/webpack.yml: -------------------------------------------------------------------------------- 1 | name: NodeJS with Webpack 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | pull_request: 7 | branches: [ "master" ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | strategy: 14 | matrix: 15 | node-version: [18.x, 20.x, 22.x] 16 | 17 | steps: 18 | - uses: actions/checkout@v4 19 | 20 | - name: Use Node.js ${{ matrix.node-version }} 21 | uses: actions/setup-node@v4 22 | with: 23 | node-version: ${{ matrix.node-version }} 24 | 25 | - name: Build 26 | run: | 27 | npm install 28 | npx webpack 29 | -------------------------------------------------------------------------------- /.github/workflows/npm-publish.yml: -------------------------------------------------------------------------------- 1 | # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created 2 | # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages 3 | 4 | name: Node.js Package 5 | 6 | on: 7 | release: 8 | types: [created] 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v4 15 | - uses: actions/setup-node@v4 16 | with: 17 | node-version: 20 18 | - run: npm ci 19 | 20 | publish-npm: 21 | needs: build 22 | runs-on: ubuntu-latest 23 | steps: 24 | - uses: actions/checkout@v4 25 | - uses: actions/setup-node@v4 26 | with: 27 | node-version: 20 28 | registry-url: https://registry.npmjs.org/ 29 | - run: npm ci 30 | - run: npm publish 31 | env: 32 | NODE_AUTH_TOKEN: ${{secrets.npm_token}} 33 | -------------------------------------------------------------------------------- /src/entry.js: -------------------------------------------------------------------------------- 1 | // Import vue component 2 | import component from '@/v-nepalidatepicker.vue'; 3 | 4 | // install function executed by Vue.use() 5 | const install = function installVNepalidatepicker(Vue) { 6 | if (install.installed) return; 7 | install.installed = true; 8 | Vue.component('VNepalidatepicker', component); 9 | }; 10 | 11 | // Create module definition for Vue.use() 12 | const plugin = { 13 | install, 14 | }; 15 | 16 | // To auto-install on non-es builds, when vue is found 17 | // eslint-disable-next-line no-redeclare 18 | /* global window, global */ 19 | if ('false' === process.env.ES_BUILD) { 20 | let GlobalVue = null; 21 | if (typeof window !== 'undefined') { 22 | GlobalVue = window.Vue; 23 | } else if (typeof global !== 'undefined') { 24 | GlobalVue = global.Vue; 25 | } 26 | if (GlobalVue) { 27 | GlobalVue.use(plugin); 28 | } 29 | } 30 | 31 | // Inject install function into component - allows component 32 | // to be registered via Vue.use() as well as Vue.component() 33 | component.install = install; 34 | 35 | // Export component by default 36 | export default component; 37 | 38 | // It's possible to expose named exports when writing components that can 39 | // also be used as directives, etc. - eg. import { RollupDemoDirective } from 'rollup-demo'; 40 | // export const RollupDemoDirective = component; 41 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "v-nepalidatepicker", 3 | "version": "1.2.7", 4 | "description": "Nepali Date Picker component for Vue js", 5 | "main": "dist/v-nepalidatepicker.ssr.js", 6 | "browser": "dist/v-nepalidatepicker.esm.js", 7 | "module": "dist/v-nepalidatepicker.esm.js", 8 | "unpkg": "dist/v-nepalidatepicker.min.js", 9 | "files": [ 10 | "dist/*", 11 | "src/**/*.vue" 12 | ], 13 | "scripts": { 14 | "serve": "vue-cli-service serve dev/serve.js", 15 | "build": "cross-env NODE_ENV=production rollup --config build/rollup.config.js", 16 | "build:ssr": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format cjs", 17 | "build:es": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format es", 18 | "build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife" 19 | }, 20 | "repository": { 21 | "type": "git", 22 | "url": "git+https://github.com/krijanniroula/v-nepalidatepicker.git" 23 | }, 24 | "keywords": [ 25 | "nepalidatepicker", 26 | "v-nepalidatepicker", 27 | "vue-datepicker", 28 | "datepicker", 29 | "nepali", 30 | "nepalidate", 31 | "vuenepali", 32 | "vue nepali datepicker", 33 | "datepicker nepali", 34 | "vue nepali" 35 | ], 36 | "dependencies": { 37 | "nepali-date": "^0.1.3" 38 | }, 39 | "devDependencies": { 40 | "@babel/core": "^7.9.0", 41 | "@babel/preset-env": "^7.9.5", 42 | "@rollup/plugin-alias": "^2.2.0", 43 | "@rollup/plugin-commonjs": "^11.1.0", 44 | "@rollup/plugin-replace": "^2.3.2", 45 | "@vue/cli-plugin-babel": "^4.3.1", 46 | "@vue/cli-service": "^4.3.1", 47 | "cross-env": "^7.0.2", 48 | "minimist": "^1.2.5", 49 | "rollup": "^2.7.3", 50 | "rollup-plugin-babel": "^4.4.0", 51 | "rollup-plugin-terser": "^5.3.0", 52 | "rollup-plugin-vue": "^5.1.6", 53 | "vue": "^2.6.11", 54 | "vue-template-compiler": "^2.6.11" 55 | }, 56 | "peerDependencies": { 57 | "vue": "^2.6.11" 58 | }, 59 | "engines": { 60 | "node": ">=10" 61 | }, 62 | "author": "Krijan Niroula", 63 | "license": "MIT", 64 | "bugs": { 65 | "url": "https://github.com/krijanniroula/v-nepalidatepicker/issues" 66 | }, 67 | "homepage": "https://github.com/krijanniroula/v-nepalidatepicker#readme" 68 | } 69 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # nepali-datepicker-vuejs 2 | 3 | > An easy-to-use and customizable nepali date picker component powered by Vue js 4 | 5 | # Demo: 6 | 7 | https://codesandbox.io/s/quizzical-banzai-mv19x 8 | 9 | 10 | ## Install 11 | ```shell 12 | npm install v-nepalidatepicker 13 | 14 | OR 15 | 16 | yarn add v-nepalidatepicker 17 | ``` 18 | 19 | ## Quick Start 20 | ``` javascript 21 | import VNepaliDatePicker from 'v-nepalidatepicker'; 22 | 23 | export default { 24 | components: { 25 | VNepaliDatePicker, 26 | }, 27 | // rest of the component 28 | } 29 | 30 | Or even used via 33 | 34 | ... 35 | 36 | ... 37 | 38 | ``` 39 | 40 | ## Customizable Properties 41 | 42 | The following customizable properties can be added to the component 43 | 44 | 1. classValue 45 | 2. calenderType 46 | 3. placeholder 47 | 4. format 48 | 5. value 49 | 6. yearSelect 50 | 7. monthSelect 51 | 52 | ## Examples - classValue 53 | 54 | This works exactly as class properties. Eg: classValue="form-control" (boostrap class) 55 | (Note : In class="form-control", input will be rendered inside another input.) 56 | 57 | ```vue 58 | 59 | 60 | 61 | 67 | ``` 68 | 69 | 70 | ## Examples - calenderType 71 | 72 | Date picker is present in nepali language and English nepali language. 73 | Default type will be English nepali. 74 | 75 | For nepali language : 76 | 77 | ```vue 78 | 79 | 80 | 81 | 82 | ``` 83 | 84 | ## Examples - placeholder 85 | 86 | ```vue 87 | 88 | 89 | 90 | 91 | ``` 92 | 93 | ## Examples - format 94 | 95 | Format the date to provide various output based on format string 96 | 97 | ```vue 98 | 99 | 'yyyy-mm-dd' => २०७५-०२-०१ 100 | 'YYY-MM-DD' => 075-02-01 101 | 'mmmm d, yyyy ddd' => जेष्ठ १, २०७५ मंगल 102 | 'MMM D, YYYY DDD' => Jes 1, 2075 Tue 103 | 104 | ``` 105 | 106 | ```vue 107 | 108 | YYYY - 4 digit of year (2075) 109 | yyyy - 4 digit of year in nepali unicode (२०७५) 110 | YYY - 3 digit of year (075) 111 | yyy - 3 digit of year (०७५) 112 | YY - 2 digit of year 113 | yy - 2 digit of year in nepali unicode (७५) 114 | M - month number (1 - 12) 115 | m - month number (१ - १२) in nepali unicode 116 | MM - month number with 0 padding (01 - 12) 117 | mm - month number in nepali unicode with 0 padding - (०१-१२) 118 | MMM - short month name (Bai, Jes, Asa, Shr, etc.) 119 | mmm - short month name in nepali unicde (बै, जे, अ, श्रा, etc) 120 | MMMM - full month name (Baisakh, Jestha, Asar, ...) 121 | mmmm - full month name nepali (बैसाख, जेष्ठ, ...) 122 | D - Day of Month (1, 2, ... 31, 32) 123 | d - Day of Month in Nepali unicode (१, २, ३ ... ३१, ३२) 124 | DD - Day of Month with zero padding (01, 02, ...) 125 | dd - Day of Month with zero padding in Nepali unicode (०१, ०२, ...) 126 | DDD - Day of Week short form (Sun, Mon, Tue, ...) 127 | ddd - Day of week in short form nepali (आइत, सोम, ...) 128 | DDDD - Day of week full form (Sunday, Monday, Tuesday, ...) 129 | dddd - Day of week full form nepali (आइतबार, सोमबार, ...) 130 | 131 | ``` 132 | 133 | ```vue 134 | 135 | 136 | 137 | 138 | ``` 139 | 140 | ## Examples - value 141 | 142 | Initial value for the datepicker. 143 | 144 | ```vue 145 | 146 | 147 | 148 | 149 | ``` 150 | 151 | ## Examples - yearSelect 152 | 153 | The dropdown year select can be turned off using boolean type to yearSelect 154 | 155 | ```vue 156 | 157 | 158 | 159 | 160 | ``` 161 | 162 | ## Examples - monthSelect 163 | 164 | The dropdown month select can be turned off using boolean type to monthSelect 165 | 166 | ```vue 167 | 168 | 169 | 170 | 171 | ``` 172 | 173 | ## Examples - All in one 174 | 175 | ```vue 176 | 177 | 178 | 179 | 180 | ``` 181 | -------------------------------------------------------------------------------- /src/constants.js: -------------------------------------------------------------------------------- 1 | export const YEAR_DATES = [ 2 | { year: 2000, value: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31] }, 3 | { year: 2001, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 4 | { year: 2002, value: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30] }, 5 | { year: 2003, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31] }, 6 | { year: 2004, value: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31] }, 7 | { year: 2005, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 8 | { year: 2006, value: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30] }, 9 | { year: 2007, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31] }, 10 | { year: 2007, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31] }, 11 | { year: 2008, value: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31] }, 12 | { year: 2009, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 13 | { year: 2010, value: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30] }, 14 | { year: 2011, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31] }, 15 | { year: 2012, value: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30] }, 16 | { year: 2013, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 17 | { year: 2014, value: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30] }, 18 | { year: 2015, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31] }, 19 | { year: 2016, value: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30] }, 20 | { year: 2017, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 21 | { year: 2018, value: [31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30] }, 22 | { year: 2019, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31] }, 23 | { year: 2020, value: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30] }, 24 | { year: 2021, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 25 | { year: 2022, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30] }, 26 | { year: 2023, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31] }, 27 | { year: 2024, value: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30] }, 28 | { year: 2025, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 29 | { year: 2026, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31] }, 30 | { year: 2027, value: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31] }, 31 | { year: 2028, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 32 | { year: 2029, value: [31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30] }, 33 | { year: 2030, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31] }, 34 | { year: 2031, value: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31] }, 35 | { year: 2032, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 36 | { year: 2033, value: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30] }, 37 | { year: 2034, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31] }, 38 | { year: 2035, value: [30, 32, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31] }, 39 | { year: 2036, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 40 | { year: 2037, value: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30] }, 41 | { year: 2038, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31] }, 42 | { year: 2039, value: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30] }, 43 | { year: 2040, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 44 | { year: 2041, value: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30] }, 45 | { year: 2042, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31] }, 46 | { year: 2043, value: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30] }, 47 | { year: 2044, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 48 | { year: 2045, value: [31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30] }, 49 | { year: 2046, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31] }, 50 | { year: 2047, value: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30] }, 51 | { year: 2048, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 52 | { year: 2049, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30] }, 53 | { year: 2050, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31] }, 54 | { year: 2051, value: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30] }, 55 | { year: 2052, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 56 | { year: 2053, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30] }, 57 | { year: 2054, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31] }, 58 | { year: 2055, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 59 | { year: 2056, value: [31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30] }, 60 | { year: 2057, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31] }, 61 | { year: 2058, value: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31] }, 62 | { year: 2059, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 63 | { year: 2060, value: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30] }, 64 | { year: 2061, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31] }, 65 | { year: 2062, value: [30, 32, 31, 32, 31, 31, 29, 30, 29, 30, 29, 31] }, 66 | { year: 2063, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 67 | { year: 2064, value: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30] }, 68 | { year: 2065, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31] }, 69 | { year: 2066, value: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31] }, 70 | { year: 2067, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 71 | { year: 2068, value: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30] }, 72 | { year: 2069, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31] }, 73 | { year: 2070, value: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30] }, 74 | { year: 2071, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 75 | { year: 2072, value: [31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30] }, 76 | { year: 2073, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31] }, 77 | { year: 2074, value: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30] }, 78 | { year: 2075, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 79 | { year: 2076, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30] }, 80 | { year: 2077, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31] }, 81 | { year: 2078, value: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30] }, 82 | { year: 2079, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30] }, 83 | { year: 2080, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30] }, 84 | { year: 2081, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31] }, 85 | { year: 2082, value: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30] }, 86 | { year: 2083, value: [31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30] }, 87 | { year: 2084, value: [31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30] }, 88 | { year: 2085, value: [31, 32, 31, 32, 30, 31, 30, 30, 29, 30, 30, 30] }, 89 | { year: 2086, value: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30] }, 90 | { year: 2087, value: [31, 31, 32, 31, 31, 31, 30, 30, 29, 30, 30, 30] }, 91 | { year: 2088, value: [30, 31, 32, 32, 30, 31, 30, 30, 29, 30, 30, 30] }, 92 | { year: 2089, value: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30] }, 93 | { year: 2090, value: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30] }, 94 | { year: 2091, value: [31, 31, 32, 31, 31, 31, 30, 30, 29, 30, 30, 30] }, 95 | { year: 2092, value: [30, 31, 32, 32, 31, 30, 30, 30, 29, 30, 30, 30] }, 96 | { year: 2093, value: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30] }, 97 | { year: 2094, value: [31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30] }, 98 | { year: 2095, value: [31, 31, 32, 31, 31, 31, 30, 29, 30, 30, 30, 30] }, 99 | { year: 2096, value: [30, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30] }, 100 | { year: 2097, value: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30] }, 101 | { year: 2098, value: [31, 31, 32, 31, 31, 31, 29, 30, 29, 30, 29, 31] }, 102 | { year: 2099, value: [31, 31, 32, 31, 31, 31, 30, 29, 29, 30, 30, 30] }, 103 | ]; 104 | 105 | export const ENGLISH_WEEK = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; 106 | 107 | export const NEPALI_WEEK = ["आइत", "सोम", "मंगल", "बुध", "बिहि", "शुक्र", "शनि"]; 108 | 109 | export const ENGLISH_NEPALI_MONTH = [ 110 | "Baisakh", 111 | "Jestha", 112 | "Asar", 113 | "Shrawan", 114 | "Bhadra", 115 | "Aswin", 116 | "Kartik", 117 | "Mangsir", 118 | "Poush", 119 | "Magh", 120 | "Falgun", 121 | "Chaitra", 122 | ]; 123 | 124 | export const NEPALI_MONTH = [ 125 | "बैशाख", 126 | "जेठ", 127 | "असार", 128 | "श्रावण", 129 | "भाद्र", 130 | "आश्विन", 131 | "कार्तिक", 132 | "मंसिर", 133 | "पौष", 134 | "माघ", 135 | "फाल्गुण", 136 | "चैत्र", 137 | ] -------------------------------------------------------------------------------- /src/v-nepalidatepicker.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 12 | {{ formatedYear }} 13 | {{ formatedDate }} 14 | 15 | 16 | 17 | 18 | 19 | > 20 | 21 | {{ formatedYearOrMonth }} 22 | 29 | 36 | 37 | 38 | 39 | 46 | 57 | 58 | 59 | > 60 | 61 | 62 | 63 | 64 | 70 | {{ weekday }} 71 | 72 | 73 | 74 | 75 | 79 | 89 | {{ formatNepali ? convertToNepali(day).substr(8, 10) : day.day }} 90 | 91 | 92 | 93 | 94 | 97 | 98 | 99 | 100 | 101 | 287 | 288 | 422 | --------------------------------------------------------------------------------