├── .github ├── PULL_REQUEST_TEMPLATE.md └── ISSUE_TEMPLATE.md ├── .eslintignore ├── test ├── helpers │ ├── assert.js │ ├── entry.js │ └── wait-for-update.js ├── .eslintrc ├── e2e │ ├── test │ │ └── add.js │ └── runner.js └── unit │ ├── index.js │ ├── plugin.test.js │ └── index.html ├── .travis.yml ├── .gitignore ├── src ├── index.js ├── demo.js ├── RangedatePicker.vue └── js │ └── rangedate-picker.js ├── .flowconfig ├── .editorconfig ├── config ├── .eslintrc ├── karma.unit.conf.js ├── banner.js ├── version.js ├── karma.cover.conf.js ├── build.js ├── karma.base.conf.js ├── webpack.dev.conf.js ├── nightwatch.conf.js ├── entry.js ├── webpack.prod.conf.js ├── bundle.js └── karma.sauce.conf.js ├── .babelrc ├── demo ├── src │ └── main.js └── index.html ├── .eslintrc ├── LICENSE ├── CONTRIBUTING.md ├── package.json ├── README.md └── dist ├── vue-rangedate-picker.min.js └── vue-rangedate-picker.js /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | build/ 3 | demo/ 4 | node_modules/ 5 | config/*.js 6 | -------------------------------------------------------------------------------- /test/helpers/assert.js: -------------------------------------------------------------------------------- 1 | import assert from 'assert' 2 | 3 | window.assert = assert 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "6" 4 | before_install: 5 | - npm install -g phantomjs 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | npm-debug.log 4 | npm-debug.log* 5 | test/coverage 6 | yarn-error.log 7 | reports 8 | .idea/* 9 | test/dist 10 | 11 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import plugin from '@/RangedatePicker.vue' 2 | 3 | export default { 4 | install: function (Vue, options) { 5 | Vue.component(plugin.name, plugin) 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | .*/node_modules/.* 3 | .*/docs/.* 4 | .*/test/.* 5 | .*/config/.* 6 | .*/examples/.* 7 | 8 | [include] 9 | 10 | [libs] 11 | decls 12 | 13 | [options] 14 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /config/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "globals": { 3 | "process": true 4 | }, 5 | "extends": "vue", 6 | "rules": { 7 | "no-multiple-empty-lines": [2, {"max": 2}], 8 | "no-console": 0 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "mocha": true 5 | }, 6 | "globals": { 7 | "waitForUpdate": true, 8 | "nextTick": true, 9 | "delay": true, 10 | "assert": true, 11 | "Vue": true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /config/karma.unit.conf.js: -------------------------------------------------------------------------------- 1 | const base = require('./karma.base.conf') 2 | 3 | module.exports = config => { 4 | config.set(Object.assign(base, { 5 | reporters: ['spec', 'progress'], 6 | browsers: ['Chrome', 'Firefox', 'Safari'], 7 | singleRun: true 8 | })) 9 | } 10 | -------------------------------------------------------------------------------- /test/e2e/test/add.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | add: function (browser) { 3 | browser 4 | .url('http://localhost:8080/examples/add/') 5 | .waitForElementVisible('p', 1000) 6 | .assert.containsText('p', '2', 'You should be implemented !!') 7 | .end() 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/unit/index.js: -------------------------------------------------------------------------------- 1 | // import all helpers 2 | const helpersContext = require.context('../helpers', true) 3 | helpersContext.keys().forEach(helpersContext) 4 | 5 | // require all test files 6 | const testsContext = require.context('./', true, /\.test/) 7 | testsContext.keys().forEach(testsContext) 8 | -------------------------------------------------------------------------------- /test/helpers/entry.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import plugin from '../../src/index' 3 | import 'babel-polyfill' // promise and etc ... 4 | 5 | Vue.config.productionTip = false 6 | Vue.use(plugin) 7 | 8 | console.log('loading helpers') 9 | 10 | window.Vue = Vue 11 | Vue.config.debug = true 12 | -------------------------------------------------------------------------------- /config/banner.js: -------------------------------------------------------------------------------- 1 | const pack = require('../package.json') 2 | const version = process.env.VERSION || pack.version 3 | 4 | module.exports = 5 | '/*!\n' + 6 | ` * ${pack.name} v${version} \n` + 7 | ` * (c) ${new Date().getFullYear()} ${pack.author.name}\n` + 8 | ` * Released under the ${pack.license} License.\n` + 9 | ' */' 10 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["es2015", { 4 | "modules": false 5 | }], 6 | "flow-vue" 7 | ], 8 | "plugins": [ 9 | "babel-plugin-espower", 10 | "transform-runtime" 11 | ], 12 | "env": { 13 | "test": { 14 | "plugins": ["istanbul"], 15 | "presets": ["power-assert"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /demo/src/main.js: -------------------------------------------------------------------------------- 1 | VueRangedatePicker.default.install(Vue) 2 | 3 | var app = new Vue({ 4 | el: '#app', 5 | data () { 6 | return { 7 | selectedDate: { 8 | start: '', 9 | end: '' 10 | } 11 | } 12 | }, 13 | methods: { 14 | onDateSelected: function (daterange) { 15 | this.selectedDate = daterange 16 | } 17 | } 18 | }) 19 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "plugins": [ 4 | "flowtype" 5 | ], 6 | "extends": [ 7 | "plugin:vue-libs/recommended", 8 | "plugin:flowtype/recommended" 9 | ], 10 | "rules": { 11 | "object-curly-spacing": [ 12 | "error", 13 | "always" 14 | ], 15 | "no-multiple-empty-lines": [ 16 | "error", 17 | { 18 | "max": 2, 19 | "maxBOF": 1 20 | } 21 | ] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /config/version.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const pack = require('../package.json') 3 | 4 | // update installation.md 5 | const installation = fs 6 | .readFileSync('./gitbook/installation.md', 'utf-8') 7 | .replace( 8 | /https:\/\/unpkg\.com\/vue-h-zoom@[\d.]+.[\d]+\/dist\/vue-h-zoom\.js/, 9 | 'https://unpkg.com/vue-h-zoom@' + pack.version + '/dist/vue-h-zoom.js.' 10 | ) 11 | fs.writeFileSync('./gitbook/installation.md', installation) 12 | -------------------------------------------------------------------------------- /config/karma.cover.conf.js: -------------------------------------------------------------------------------- 1 | const base = require('./karma.base.conf') 2 | 3 | module.exports = config => { 4 | const options = Object.assign(base, { 5 | browsers: ['ChromeHeadless'], 6 | reporters: ['mocha', 'coverage'], 7 | coverageReporter: { 8 | reporters: [ 9 | { type: 'lcov', dir: '../coverage', subdir: '.' }, 10 | { type: 'text-summary', dir: '../coverage', subdir: '.' } 11 | ] 12 | }, 13 | singleRun: true 14 | }) 15 | 16 | config.set(options) 17 | } 18 | -------------------------------------------------------------------------------- /test/unit/plugin.test.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import RangedatePicker from '@/RangedatePicker.vue' 3 | 4 | describe('RangedatePicker', () => { 5 | let vm 6 | 7 | beforeEach(() => { 8 | vm = new (Vue.extend(RangedatePicker))({ 9 | propsData: { 10 | image: '/abc.jpg' 11 | } 12 | }) 13 | vm.$mount() 14 | }) 15 | 16 | describe('image', () => { 17 | it('should be /abc.jpg', () => { 18 | assert(vm.image === '/abc.jpg', 'You should be implemented!!') 19 | }) 20 | }) 21 | }) 22 | 23 | -------------------------------------------------------------------------------- /test/unit/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | vue-rangedate-picker tests 5 | 6 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /config/build.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const exist = fs.existsSync 3 | const mkdir = fs.mkdirSync 4 | const getAllEntries = require('./entry').getAllEntries 5 | const build = require('./bundle') 6 | 7 | if (!exist('dist')) { 8 | mkdir('dist') 9 | } 10 | 11 | let entries = getAllEntries() 12 | 13 | // filter entries via command line arg 14 | if (process.argv[2]) { 15 | const filters = process.argv[2].split(',') 16 | entries = entries.filter(b => { 17 | return filters.some(f => b.dest.indexOf(f) > -1) 18 | }) 19 | } 20 | 21 | build(entries) 22 | -------------------------------------------------------------------------------- /src/demo.js: -------------------------------------------------------------------------------- 1 | // /** Lines below are already loaded in /test/helpers/entry.js 2 | // import Vue from 'vue' 3 | // import plugin from './index' 4 | // import 'babel-polyfill' // promise and etc ... 5 | // 6 | // Vue.config.productionTip = false 7 | // Vue.use(plugin) 8 | // 9 | // window.Vue = Vue 10 | // Vue.config.debug = true 11 | // */ 12 | 13 | import VueRangeDatePicker from './RangedatePicker.vue' 14 | 15 | new window.Vue({ 16 | el: 'app', 17 | template: `
18 |
19 | Full form 20 | 21 |
22 |
23 | Compact (mobile) 24 | 25 |
26 |
`, 27 | components: { VueRangeDatePicker } 28 | }) 29 | -------------------------------------------------------------------------------- /test/e2e/runner.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const spawn = require('cross-spawn') 3 | const httpServer = require('http-server') 4 | const server = httpServer.createServer({ 5 | root: path.resolve(__dirname, '../../') 6 | }) 7 | 8 | server.listen(8080) 9 | 10 | let args = process.argv.slice(2) 11 | if (args.indexOf('--config') === -1) { 12 | args = args.concat(['--config', 'config/nightwatch.conf.js']) 13 | } 14 | if (args.indexOf('--env') === -1) { 15 | args = args.concat(['--env', 'chrome,headless']) 16 | } 17 | const i = args.indexOf('--test') 18 | if (i > -1) { 19 | args[i + 1] = 'test/e2e/test/' + args[i + 1] 20 | } 21 | 22 | const runner = spawn('./node_modules/.bin/nightwatch', args, { 23 | stdio: 'inherit' 24 | }) 25 | 26 | runner.on('exit', code => { 27 | server.close() 28 | process.exit(code) 29 | }) 30 | 31 | runner.on('error', err => { 32 | server.close() 33 | throw err 34 | }) 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 hidayat.febiansyah 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Contributions are **welcome** and will be fully **credited**. 4 | 5 | We accept contributions via Pull Requests on [Github](https://github.com/havban/vue-rangedate-picker). 6 | 7 | 8 | ## Pull Requests 9 | 10 | - **Keep the same style** - eslint will automatically be ran before committing 11 | 12 | - **Tip** to pass lint tests easier use the `npm run lint:fix` command 13 | 14 | - **Add tests!** - Your patch won't be accepted if it doesn't have tests. 15 | 16 | - **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. 17 | 18 | - **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option. 19 | 20 | - **Create feature branches** - Don't ask us to pull from your master branch. 21 | 22 | - **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. 23 | 24 | - **Send coherent history** - Make sure your commits message means something 25 | 26 | 27 | ## Running Tests 28 | 29 | Launch visual tests and watch the components at the same time 30 | 31 | ``` bash 32 | $ npm run dev 33 | ``` 34 | 35 | 36 | **Happy coding**! 37 | -------------------------------------------------------------------------------- /config/karma.base.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const webpack = require('webpack') 3 | 4 | function resolve (dir) { 5 | return path.join(__dirname, '..', dir) 6 | } 7 | 8 | const webpackConfig = { 9 | resolve: { 10 | extensions: ['.js', '.vue'], 11 | alias: { 12 | vue: 'vue/dist/vue.js', 13 | '@': resolve('src') 14 | } 15 | }, 16 | module: { 17 | loaders: [{ 18 | test: /\.js$/, 19 | exclude: /node_modules|vue\/dist/, 20 | loader: 'babel-loader' 21 | }, 22 | { 23 | test: /\.vue$/, 24 | loader: 'vue-loader', 25 | options: { 26 | loaders: { 27 | js: 'babel-loader!eslint-loader' 28 | } 29 | } 30 | }] 31 | }, 32 | plugins: [ 33 | new webpack.DefinePlugin({ 34 | 'process.env': { 35 | NODE_ENV: '"development"' 36 | } 37 | }) 38 | ], 39 | devtool: '#inline-source-map' 40 | } 41 | 42 | module.exports = { 43 | basePath: '', 44 | files: [ 45 | '../test/unit/index.js' 46 | ], 47 | exclude: [ 48 | ], 49 | frameworks: ['mocha'], 50 | preprocessors: { 51 | '../test/unit/index.js': ['webpack', 'sourcemap'] 52 | }, 53 | webpack: webpackConfig, 54 | webpackMiddleware: { 55 | noInfo: true 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /config/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const webpack = require('webpack') 3 | const CopyWebpackPlugin = require('copy-webpack-plugin') 4 | 5 | function resolve (dir) { 6 | return path.join(__dirname, '..', dir) 7 | } 8 | 9 | module.exports = { 10 | entry: { 11 | tests: 'mocha-loader!./test/unit/index.js', 12 | demo: './src/demo.js' 13 | }, 14 | resolve: { 15 | extensions: ['.js', '.vue'], 16 | alias: { 17 | vue: 'vue/dist/vue.js', 18 | '@': resolve('src') 19 | } 20 | }, 21 | output: { 22 | path: path.resolve(__dirname, '/test/unit'), 23 | filename: '[name].js', 24 | publicPath: '/' 25 | }, 26 | module: { 27 | rules: [{ 28 | test: /\.js$/, 29 | exclude: /node_modules|vue\/dist/, 30 | loader: 'babel-loader' 31 | }, 32 | { 33 | test: /\.vue$/, 34 | loader: 'vue-loader', 35 | options: { 36 | loaders: { 37 | js: 'babel-loader!eslint-loader' 38 | } 39 | } 40 | }] 41 | }, 42 | plugins: [ 43 | new webpack.DefinePlugin({ 44 | 'process.env': { 45 | NODE_ENV: '"development"' 46 | } 47 | }), 48 | new CopyWebpackPlugin([ { from: 'src/assets', to: 'assets' } ]) 49 | ], 50 | devtool: '#eval-source-map' 51 | } 52 | -------------------------------------------------------------------------------- /config/nightwatch.conf.js: -------------------------------------------------------------------------------- 1 | // http://nightwatchjs.org/guide#settings-file 2 | module.exports = { 3 | src_folders: ['test/e2e/test'], 4 | output_folder: 'test/e2e/report', 5 | custom_commands_path: ['node_modules/nightwatch-helpers/commands'], 6 | custom_assertions_path: ['node_modules/nightwatch-helpers/assertions'], 7 | 8 | selenium: { 9 | start_process: true, 10 | server_path: 'node_modules/selenium-server/lib/runner/selenium-server-standalone-2.53.1.jar', 11 | host: '127.0.0.1', 12 | port: 4444, 13 | cli_args: { 14 | 'webdriver.chrome.driver': require('chromedriver').path 15 | } 16 | }, 17 | 18 | test_settings: { 19 | default: { 20 | selenium_port: 4444, 21 | selenium_host: 'localhost', 22 | silent: true, 23 | screenshots: { 24 | enabled: true, 25 | on_failure: true, 26 | on_error: false, 27 | path: 'test/e2e/screenshots' 28 | } 29 | }, 30 | 31 | chrome: { 32 | desiredCapabilities: { 33 | browserName: 'chrome', 34 | javascriptEnabled: true, 35 | acceptSslCerts: true 36 | } 37 | }, 38 | 39 | firefox: { 40 | desiredCapabilities: { 41 | browserName: 'firefox', 42 | javascriptEnabled: true, 43 | acceptSslCerts: true 44 | } 45 | }, 46 | 47 | headless: { 48 | desiredCapabilities: { 49 | browserName: 'chrome', 50 | chromeOptions : { 51 | args : ['headless'] 52 | }, 53 | javascriptEnabled: true, 54 | acceptSslCerts: true 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /config/entry.js: -------------------------------------------------------------------------------- 1 | const replace = require('rollup-plugin-replace') 2 | const flow = require('rollup-plugin-flow-no-whitespace') 3 | const buble = require('rollup-plugin-buble') 4 | const banner = require('./banner') 5 | const pack = require('../package.json') 6 | 7 | function toUpper (_, c) { 8 | return c ? c.toUpperCase() : '' 9 | } 10 | 11 | const classifyRE = /(?:^|[-_\/])(\w)/g 12 | function classify (str) { 13 | return str.replace(classifyRE, toUpper) 14 | } 15 | const moduleName = classify(pack.name) 16 | 17 | const entries = { 18 | commonjs: { 19 | entry: 'src/index.js', 20 | dest: `dist/${pack.name}.common.js`, 21 | format: 'cjs', 22 | banner 23 | }, 24 | esm: { 25 | entry: 'src/index.js', 26 | dest: `dist/${pack.name}.esm.js`, 27 | format: 'es', 28 | banner 29 | }, 30 | production: { 31 | entry: 'src/index.js', 32 | dest: `dist/${pack.name}.min.js`, 33 | format: 'umd', 34 | env: 'production', 35 | moduleName, 36 | banner 37 | }, 38 | development: { 39 | entry: 'src/index.js', 40 | dest: `dist/${pack.name}.js`, 41 | format: 'umd', 42 | env: 'development', 43 | moduleName, 44 | banner 45 | } 46 | } 47 | 48 | function genConfig (opts) { 49 | const config = { 50 | entry: opts.entry, 51 | dest: opts.dest, 52 | format: opts.format, 53 | banner: opts.banner, 54 | moduleName, 55 | plugins: [ 56 | flow(), 57 | buble() 58 | ] 59 | } 60 | 61 | const replacePluginOptions = { '__VERSION__': pack.version } 62 | if (opts.env) { 63 | replacePluginOptions['process.env.NODE_ENV'] = JSON.stringify(opts.env) 64 | } 65 | config.plugins.push(replace(replacePluginOptions)) 66 | 67 | return config 68 | } 69 | 70 | exports.getEntry = name => genConfig(entries[name]) 71 | exports.getAllEntries = () => Object.keys(entries).map(name => genConfig(entries[name])) 72 | -------------------------------------------------------------------------------- /config/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const webpack = require('webpack') 3 | const merge = require('webpack-merge') 4 | const CopyWebpackPlugin = require('copy-webpack-plugin') 5 | 6 | function resolve (dir) { 7 | return path.join(__dirname, '..', dir) 8 | } 9 | 10 | const commonConfig = { 11 | resolve: { 12 | extensions: ['.vue', '.js'], 13 | alias: { 14 | vue: 'vue/dist/vue.js', 15 | '@': resolve('src') 16 | } 17 | }, 18 | output: { 19 | path: resolve('dist/') 20 | }, 21 | module: { 22 | rules: [{ 23 | test: /\.js$/, 24 | exclude: /node_modules|vue\/dist/, 25 | loader: 'babel-loader' 26 | }, 27 | { 28 | test: /\.vue$/, 29 | loader: 'vue-loader', 30 | options: { 31 | loaders: { 32 | js: 'babel-loader!eslint-loader' 33 | } 34 | } 35 | }, 36 | { 37 | test: /\.css$/, 38 | loader: 'style!less!css' 39 | }] 40 | }, 41 | externals: { 42 | vue: 'vue' 43 | }, 44 | plugins: [ 45 | new webpack.DefinePlugin({ 46 | 'process.env': { 47 | NODE_ENV: '"production"' 48 | } 49 | }), 50 | new webpack.optimize.UglifyJsPlugin( { 51 | minimize : true, 52 | sourceMap : false, 53 | mangle: true, 54 | compress: { 55 | warnings: false 56 | } 57 | }) 58 | ] 59 | } 60 | module.exports = [ 61 | merge(commonConfig, { 62 | entry: resolve('src/index.js'), 63 | output: { 64 | filename: 'vue-rangedate-picker.min.js', 65 | libraryTarget: 'window', 66 | library: 'VueRangedatePicker' 67 | } 68 | }), 69 | merge(commonConfig, { 70 | entry: resolve('src/RangedatePicker.vue'), 71 | output: { 72 | filename: 'vue-rangedate-picker.js', 73 | libraryTarget: 'umd', 74 | library: 'vue-rangedate-picker', 75 | umdNamedDefine: true 76 | } 77 | }) 78 | ] 79 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 29 | 30 | 31 | ### vue & vue-rangedate-picker version 32 | 2.0.x, x.y.z 33 | 34 | ### Reproduction Link 35 | 36 | 37 | ### Steps to reproduce 38 | 39 | ### What is Expected? 40 | 41 | ### What is actually happening? 42 | -------------------------------------------------------------------------------- /config/bundle.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const readFile = fs.readFile 3 | const writeFile = fs.writeFile 4 | const relative = require('path').relative 5 | const gzip = require('zlib').gzip 6 | const rollup = require('rollup') 7 | const uglify = require('uglify-js') 8 | 9 | module.exports = build 10 | 11 | function build (entries) { 12 | let built = 0 13 | const total = entries.length 14 | const next = () => { 15 | buildEntry(entries[built]).then(() => { 16 | built++ 17 | if (built < total) { 18 | next() 19 | } 20 | }).catch(logError) 21 | } 22 | next() 23 | } 24 | 25 | function buildEntry (config) { 26 | const isProd = /min\.js$/.test(config.dest) 27 | return rollup.rollup(config).then(bundle => { 28 | const code = bundle.generate(config).code 29 | if (isProd) { 30 | var minified = (config.banner ? config.banner + '\n' : '') + uglify.minify(code, { 31 | fromString: true, 32 | output: { 33 | screw_ie8: true, 34 | ascii_only: true 35 | }, 36 | compress: { 37 | pure_funcs: ['makeMap'] 38 | } 39 | }).code 40 | return write(config.dest, minified).then(zip(config.dest)) 41 | } else { 42 | return write(config.dest, code) 43 | } 44 | }) 45 | } 46 | 47 | function write (dest, code) { 48 | return new Promise(function (resolve, reject) { 49 | writeFile(dest, code, function (err) { 50 | if (err) { return reject(err) } 51 | console.log(blue(relative(process.cwd(), dest)) + ' ' + getSize(code)) 52 | resolve() 53 | }) 54 | }) 55 | } 56 | 57 | function zip (file) { 58 | return function () { 59 | return new Promise(function (resolve, reject) { 60 | readFile(file, function (err, buf) { 61 | if (err) { return reject(err) } 62 | gzip(buf, function (err, buf) { 63 | if (err) { return reject(err) } 64 | write(file + '.gz', buf).then(resolve) 65 | }) 66 | }) 67 | }) 68 | } 69 | } 70 | 71 | function getSize (code) { 72 | return (code.length / 1024).toFixed(2) + 'kb' 73 | } 74 | 75 | function logError (e) { 76 | console.log(e) 77 | } 78 | 79 | function blue (str) { 80 | return '\x1b[1m\x1b[34m' + str + '\x1b[39m\x1b[22m' 81 | } 82 | -------------------------------------------------------------------------------- /config/karma.sauce.conf.js: -------------------------------------------------------------------------------- 1 | const base = require('./karma.base.conf') 2 | const pack = require('../package.json') 3 | 4 | /** 5 | * Having too many tests running concurrently on saucelabs 6 | * causes timeouts and errors, so we have to run them in 7 | * smaller batches. 8 | */ 9 | 10 | const batches = [ 11 | // the coolkids 12 | { 13 | sl_chrome: { 14 | base: 'SauceLabs', 15 | browserName: 'chrome', 16 | platform: 'Windows 7' 17 | }, 18 | sl_firefox: { 19 | base: 'SauceLabs', 20 | browserName: 'firefox' 21 | }, 22 | sl_mac_safari: { 23 | base: 'SauceLabs', 24 | browserName: 'safari', 25 | platform: 'OS X 10.10' 26 | } 27 | }, 28 | // ie family 29 | { 30 | sl_ie_9: { 31 | base: 'SauceLabs', 32 | browserName: 'internet explorer', 33 | platform: 'Windows 7', 34 | version: '9' 35 | }, 36 | sl_ie_10: { 37 | base: 'SauceLabs', 38 | browserName: 'internet explorer', 39 | platform: 'Windows 8', 40 | version: '10' 41 | }, 42 | sl_ie_11: { 43 | base: 'SauceLabs', 44 | browserName: 'internet explorer', 45 | platform: 'Windows 8.1', 46 | version: '11' 47 | }, 48 | sl_edge: { 49 | base: 'SauceLabs', 50 | platform: 'Windows 10', 51 | browserName: 'MicrosoftEdge' 52 | } 53 | }, 54 | // mobile 55 | { 56 | sl_ios_safari_8: { 57 | base: 'SauceLabs', 58 | browserName: 'iphone', 59 | version: '8.4' 60 | }, 61 | sl_ios_safari_9: { 62 | base: 'SauceLabs', 63 | browserName: 'iphone', 64 | version: '9.3' 65 | }, 66 | sl_android_4_2: { 67 | base: 'SauceLabs', 68 | browserName: 'android', 69 | version: '4.2' 70 | }, 71 | sl_android_5_1: { 72 | base: 'SauceLabs', 73 | browserName: 'android', 74 | version: '5.1' 75 | } 76 | } 77 | ] 78 | 79 | module.exports = config => { 80 | const batch = batches[process.argv[5] || 0] 81 | 82 | config.set(Object.assign(base, { 83 | singleRun: true, 84 | browsers: Object.keys(batch), 85 | customLaunchers: batch, 86 | reporters: process.env.CI 87 | ? ['dots', 'saucelabs'] // avoid spamming CI output 88 | : ['progress', 'saucelabs'], 89 | sauceLabs: { 90 | testName: `${pack.name} unit tests`, 91 | recordScreenshots: false, 92 | build: process.env.CIRCLE_BUILD_NUM || process.env.SAUCE_BUILD_ID || Date.now() 93 | }, 94 | captureTimeout: 300000, 95 | browserNoActivityTimeout: 300000 96 | })) 97 | } 98 | -------------------------------------------------------------------------------- /test/helpers/wait-for-update.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | // helper for jasmine async assertions. 4 | // 5 | // Use like this: 6 | // 7 | // vm.a = 123 8 | // waitForUpdate(() => { 9 | // expect(vm.$el.textContent).toBe('123') 10 | // vm.a = 234 11 | // }) 12 | // .then(() => { 13 | // // more assertions... 14 | // }) 15 | // .then(done) 16 | window.waitForUpdate = initialCb => { 17 | const queue = initialCb ? [initialCb] : [] 18 | 19 | function shift () { 20 | const job = queue.shift() 21 | if (queue.length) { 22 | let hasError = false 23 | try { 24 | job.wait ? job(shift) : job() 25 | } catch (e) { 26 | hasError = true 27 | const done = queue[queue.length - 1] 28 | if (done && done.fail) { 29 | done.fail(e) 30 | } 31 | } 32 | if (!hasError && !job.wait) { 33 | if (queue.length) { 34 | Vue.nextTick(shift) 35 | } 36 | } 37 | } else if (job && job.fail) { 38 | job() // done 39 | } 40 | } 41 | 42 | Vue.nextTick(() => { 43 | if (!queue.length || !queue[queue.length - 1].fail) { 44 | console.warn('waitForUpdate chain is missing .then(done)') 45 | } 46 | shift() 47 | }) 48 | 49 | const chainer = { 50 | then: nextCb => { 51 | queue.push(nextCb) 52 | return chainer 53 | }, 54 | thenWaitFor: (wait) => { 55 | if (typeof wait === 'number') { 56 | wait = timeout(wait) 57 | } 58 | wait.wait = true 59 | queue.push(wait) 60 | return chainer 61 | } 62 | } 63 | 64 | return chainer 65 | } 66 | 67 | function timeout (n) { 68 | return next => setTimeout(next, n) 69 | } 70 | 71 | // helper for mocha async assertions. 72 | // nextTick(() => { 73 | // 74 | // Automatically waits for nextTick 75 | // }).then(() => { 76 | // return a promise or value to skip the wait 77 | // }) 78 | function nextTick (initialCb) { 79 | const jobs = initialCb ? [initialCb] : [] 80 | let done 81 | 82 | const chainer = { 83 | then (cb) { 84 | jobs.push(cb) 85 | return chainer 86 | } 87 | } 88 | 89 | function shift (...args) { 90 | const job = jobs.shift() 91 | let result 92 | try { 93 | result = job(...args) 94 | } catch (e) { 95 | jobs.length = 0 96 | done(e) 97 | } 98 | 99 | // wait for nextTick 100 | if (result !== undefined) { 101 | if (result.then) { 102 | result.then(shift) 103 | } else { 104 | shift(result) 105 | } 106 | } else if (jobs.length) { 107 | requestAnimationFrame(() => Vue.nextTick(shift)) 108 | } 109 | } 110 | 111 | // First time 112 | Vue.nextTick(() => { 113 | done = jobs[jobs.length - 1] 114 | if (done.toString().slice(0, 14) !== 'function (err)') { 115 | throw new Error('waitForUpdate chain is missing .then(done)') 116 | } 117 | shift() 118 | }) 119 | 120 | return chainer 121 | } 122 | 123 | window.nextTick = nextTick 124 | window.delay = time => new Promise(resolve => setTimeout(resolve, time)) 125 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-rangedate-picker", 3 | "version": "1.0.0", 4 | "description": "Date picker with range selection", 5 | "author": "hidayat.febiansyah ", 6 | "main": "dist/vue-rangedate-picker.js", 7 | "module": "dist/vue-rangedate-picker.js", 8 | "browser": "dist/vue-rangedate-picker.js", 9 | "unpkg": "dist/vue-rangedate-picker.js", 10 | "style": "dist/vue-rangedate-picker.css", 11 | "scripts": { 12 | "clean": "rm -rf coverage && rm -rf dist/*.js* && rm ./*.log", 13 | "dev": "cross-env BABEL_ENV=test webpack-dev-server --inline --hot --open --content-base ./test/unit/ --config config/webpack.dev.conf.js", 14 | "start": "npm run dev", 15 | "lint": "eslint src test config", 16 | "test": "npm run lint && npm run test:cover && npm run test:e2e", 17 | "test:cover": "cross-env BABEL_ENV=test karma start config/karma.cover.conf.js", 18 | "test:cover-upload": "npm run test:cover && codecov", 19 | "test:unit": "cross-env BABEL_ENV=test karma start config/karma.unit.conf.js", 20 | "build": "rm -rf dist/*.js* && webpack --config config/webpack.prod.conf.js" 21 | }, 22 | "devDependencies": { 23 | "babel-core": "^6.22.1", 24 | "babel-eslint": "^7.1.0", 25 | "babel-loader": "^6.2.10", 26 | "babel-plugin-istanbul": "^3.1.2", 27 | "babel-plugin-transform-runtime": "^6.23.0", 28 | "babel-polyfill": "6.22.0", 29 | "babel-preset-es2015": "^6.22.0", 30 | "babel-preset-flow-vue": "^1.0.0", 31 | "babel-preset-power-assert": "^1.0.0", 32 | "buble": "^0.14.0", 33 | "chromedriver": "^2.27.2", 34 | "codecov": "^3.0.0", 35 | "conventional-changelog-cli": "^1.2.0", 36 | "conventional-github-releaser": "^1.1.3", 37 | "copy-webpack-plugin": "^4.3.1", 38 | "cross-env": "^5.0.5", 39 | "cross-spawn": "^5.0.1", 40 | "eslint": "^3.14.1", 41 | "eslint-loader": "^1.6.1", 42 | "eslint-plugin-flowtype": "^2.30.0", 43 | "eslint-plugin-vue-libs": "^1.2.0", 44 | "flow-bin": "^0.38.0", 45 | "gitbook-cli": "^2.3.0", 46 | "html-webpack-plugin": "^2.19.0", 47 | "http-server": "^0.9.0", 48 | "karma": "^1.4.1", 49 | "karma-chrome-launcher": "^2.1.1", 50 | "karma-coverage": "^1.1.1", 51 | "karma-firefox-launcher": "^1.0.0", 52 | "karma-mocha": "^1.3.0", 53 | "karma-mocha-reporter": "^2.2.2", 54 | "karma-safari-launcher": "^1.0.0", 55 | "karma-sauce-launcher": "^1.1.0", 56 | "karma-sourcemap-loader": "^0.3.7", 57 | "karma-spec-reporter": "0.0.32", 58 | "karma-webpack": "^2.0.2", 59 | "mocha": "^3.2.0", 60 | "mocha-loader": "^1.1.1", 61 | "nightwatch": "^0.9.12", 62 | "nightwatch-helpers": "^1.2.0", 63 | "power-assert": "^1.4.2", 64 | "selenium-server": "2.53.1", 65 | "uglify-js": "^2.7.5", 66 | "vue": "^2.1.10", 67 | "vue-loader": "^13.7.0", 68 | "vue-template-compiler": "^2.5.13", 69 | "webpack": "^2.2.0", 70 | "webpack-dev-server": "^2.2.1", 71 | "webpack-merge": "^4.1.1" 72 | }, 73 | "files": [ 74 | "dist/vue-rangedate-picker.js", 75 | "dist/vue-rangedate-picker.min.js" 76 | ], 77 | "repository": { 78 | "type": "git", 79 | "url": "git+https://github.com/bliblidotcom/vue-rangedate-picker.git" 80 | }, 81 | "bugs": { 82 | "url": "https://github.com/bliblidotcom/vue-rangedate-picker/issues" 83 | }, 84 | "homepage": "https://github.com/bliblidotcom/vue-rangedate-picker#readme", 85 | "license": "MIT", 86 | "keywords": [ 87 | "plugin", 88 | "vue", 89 | "rangedate", 90 | "date picker", 91 | "date", 92 | "range" 93 | ], 94 | "engines": { 95 | "node": ">= 6.0" 96 | }, 97 | "dependencies": { 98 | "fecha": "^2.3.2" 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | vue-rangedate-picker | Demo 10 | 11 | 12 | 13 | 14 | 15 | 16 | 28 | 29 | 30 | 31 | 32 |
33 |
34 |
35 |
36 | 37 |
38 | 39 |

40 | vue-rangedate-picker 41 |

42 |

43 | Range date picker with simple usage 44 |

45 | 46 |   Fork in Github 47 | 48 |
49 |
50 |
51 | 52 |
53 |
54 |
55 | 56 |
57 |
58 |

Range Date Normal Mode

59 |
60 |

Start Date : {{ selectedDate.start }}

61 |

End Date : {{ selectedDate.end }}

62 | 63 |
64 |
65 | 66 | 67 |
68 |
69 | 70 |
71 |
72 | 73 |
74 |
75 |

Range Date Custom Format

76 |
77 |

Start Date : {{ selectedDate.start }}

78 |

End Date : {{ selectedDate.end }}

79 | 80 |
81 |
82 | 83 | 84 |
85 |
86 | 87 |
88 |
89 | 90 |
91 |
92 |

Range Date Right To Left

93 |
94 |

Start Date : {{ selectedDate.start }}

95 |

End Date : {{ selectedDate.end }}

96 | 97 |
98 |
99 | 100 | 101 |
102 |
103 | 104 |
105 |
106 | 107 |
108 |
109 | 110 |
111 |
112 |

Range Date Compact Mode

113 |
114 |

Start Date : {{ selectedDate.start }}

115 |

End Date : {{ selectedDate.end }}

116 | 117 |
118 |
119 | 120 | 121 |
122 |
123 | 124 |
125 |
126 | 127 |
128 |
129 |
130 | 131 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # VueRangedatePicker 2 | 3 | [![npm](https://img.shields.io/npm/v/vue-rangedate-picker.svg)](https://www.npmjs.com/package/vue-rangedate-picker) [![vue2](https://img.shields.io/badge/vue-2.x-brightgreen.svg)](https://vuejs.org/) [![travis](https://img.shields.io/travis/bliblidotcom/vue-rangedate-picker.svg)](https://travis-ci.org/bliblidotcom/vue-rangedate-picker) [![codecov](https://codecov.io/gh/bliblidotcom/vue-rangedate-picker/branch/master/graph/badge.svg)](https://codecov.io/gh/bliblidotcom/vue-rangedate-picker) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/5afaab93c27145f0bec1686beb9b8904)](https://www.codacy.com/app/bliblidotcom/vue-rangedate-picker?utm_source=github.com&utm_medium=referral&utm_content=bliblidotcom/vue-rangedate-picker&utm_campaign=Badge_Grade) 4 | 5 | > Date picker with range selection 6 | 7 | ## Demo 8 | 9 | [https://bliblidotcom.github.io/vue-rangedate-picker/demo/](https://bliblidotcom.github.io/vue-rangedate-picker/demo/) 10 | 11 | ## Installation 12 | 13 | ```bash 14 | npm install --save vue-rangedate-picker 15 | ``` 16 | 17 | ## Usage 18 | 19 | ### Bundler (Webpack, Rollup) 20 | 21 | ```js 22 | import Vue from 'vue' 23 | import VueRangedatePicker from 'vue-rangedate-picker' 24 | 25 | Vue.use(VueRangedatePicker) 26 | ``` 27 | 28 | ### Browser 29 | 30 | ```html 31 | 32 | 33 | 34 | 35 | 36 | 37 | ``` 38 | 39 | ### Available Events 40 | 41 | You can catch these below Events to `` template : 42 | 43 | + **selected** 44 | 45 | *Description* : function that will `$emit` when datepicker set value, this function will get parameter response : 46 | ```javascript 47 | { 48 | start: dateObjectStart 49 | end: dateObjectEnd 50 | } 51 | ``` 52 | 53 | ### Available Props 54 | 55 | You can pass these below props to `` template : 56 | 57 | + **configs** 58 | 59 | *Description* : - 60 | 61 | *Type* : Object 62 | 63 | *Default Value* : `{}` 64 | 65 | + **i18n** 66 | 67 | *Description* : For text translation (currently: ID/EN) 68 | 69 | *Type* : String 70 | 71 | *Default Value* : `'ID'` 72 | 73 | + **months** 74 | 75 | *Description* : Array of months name 76 | 77 | *Type* : Array 78 | 79 | *Default Value* : 80 | ```javascript 81 | ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 82 | 'Agustus', 'September', 'Oktober', 'November', 'Desember'] 83 | ``` 84 | 85 | + **shortDays** 86 | 87 | *Description* : Array of days name in short 88 | 89 | *Type* : Array 90 | 91 | *Default Value* : 92 | ```javascript 93 | ['Min', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'] 94 | ``` 95 | 96 | + **captions** 97 | 98 | *Description* : Object for text title and OK button 99 | 100 | *Type* : Object 101 | 102 | *Default Value* : 103 | ```javascript 104 | { 105 | 'title': 'Choose Dates', 106 | 'ok_button': 'Apply' 107 | } 108 | ``` 109 | 110 | + **format** 111 | 112 | *Description* : Date format 113 | 114 | *Type* : String 115 | 116 | *Default Value* : `'DD MMM YYYY'` 117 | 118 | + **styles** 119 | 120 | *Description* : - 121 | 122 | *Type* : Object 123 | 124 | *Default Value* : 125 | ```javascript 126 | { 127 | daysWeeks: 'calendar_weeks', 128 | days: 'calendar_days', 129 | daysSelected: 'calendar_days_selected', 130 | daysInRange: 'calendar_days_in-range', 131 | firstDate: 'calendar_month_left', 132 | secondDate: 'calendar_month_right', 133 | presetRanges: 'calendar_preset-ranges' 134 | } 135 | ``` 136 | 137 | + **initRange** 138 | 139 | *Description* : - 140 | 141 | *Type* : Object 142 | 143 | *Default Value* : `null` 144 | 145 | + **startActiveMonth** 146 | 147 | *Description* : Month will be shown in first launch 148 | 149 | *Type* : Number 150 | 151 | *Default Value* : `new Date().getMonth()` 152 | 153 | + **startActiveYear** 154 | 155 | *Description* : Year will be shown in first launch 156 | 157 | *Type* : Number 158 | 159 | *Default Value* : `new Date().getFullYear()` 160 | 161 | + **presetRanges** 162 | 163 | *Description* : Set of objects that will shown as quick selection of daterange 164 | 165 | *Type* : Object 166 | 167 | Example Object : 168 | ```javascript 169 | { 170 | today: function () { 171 | const n = new Date() 172 | const startToday = new Date(n.getFullYear(), n.getMonth(), n.getDate() + 1, 0, 0) 173 | const endToday = new Date(n.getFullYear(), n.getMonth(), n.getDate() + 1, 23, 59) 174 | return { 175 | label: presetRangeLabel[i18n].today, 176 | active: false, 177 | dateRange: { 178 | start: startToday, 179 | end: endToday 180 | } 181 | } 182 | } 183 | } 184 | ``` 185 | 186 | *Default Value* : 187 | ```javascript 188 | { 189 | today: function () { 190 | return { 191 | // label: 'string', active: 'boolean', dateRange: {start: date, end: end} 192 | } 193 | }, 194 | thisMonth: function () {}, 195 | lastMonth: function () {}, 196 | last7days: function () {}, 197 | last30days: function () {} 198 | } 199 | ``` 200 | 201 | + **compact** 202 | 203 | *Description* : Set to `'true'` if you want to make datepicker always shown in compact mode 204 | 205 | *Type* : String 206 | 207 | *Default Value* : `'false'` 208 | 209 | + **righttoleft** 210 | 211 | *Description* : Set to `'true'` if you want datepicker shown align to `right` 212 | 213 | *Type* : String 214 | 215 | *Default Value* : `'false'` 216 | 217 | ## Development 218 | 219 | ### Launch visual tests 220 | 221 | ```bash 222 | npm run dev 223 | ``` 224 | 225 | ### Launch Karma with coverage 226 | 227 | ```bash 228 | npm run dev:coverage 229 | ``` 230 | 231 | ### Build 232 | 233 | Bundle the js and css of to the `dist` folder: 234 | 235 | ```bash 236 | npm run build 237 | ``` 238 | 239 | 240 | ## Publishing 241 | 242 | The `prepublish` hook will ensure dist files are created before publishing. This 243 | way you don't need to commit them in your repository. 244 | 245 | ```bash 246 | # Bump the version first 247 | # It'll also commit it and create a tag 248 | npm version 249 | # Push the bumped package and tags 250 | git push --follow-tags 251 | # Ship it 🚀 252 | npm publish 253 | ``` 254 | 255 | ## License 256 | 257 | [MIT](http://opensource.org/licenses/MIT) 258 | -------------------------------------------------------------------------------- /src/RangedatePicker.vue: -------------------------------------------------------------------------------- 1 | 58 | 59 | 60 | 61 | 260 | -------------------------------------------------------------------------------- /src/js/rangedate-picker.js: -------------------------------------------------------------------------------- 1 | import fecha from 'fecha' 2 | 3 | const defaultConfig = {} 4 | const defaultI18n = 'ID' 5 | const availableMonths = { 6 | EN: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 7 | 'December'], 8 | ID: ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 9 | 'Desember'] 10 | } 11 | 12 | const availableShortDays = { 13 | EN: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], 14 | ID: ['Min', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'] 15 | } 16 | 17 | const presetRangeLabel = { 18 | EN: { 19 | today: 'Today', 20 | thisMonth: 'This Month', 21 | lastMonth: 'Last Month', 22 | lastSevenSays: 'Last 7 Days', 23 | lastThirtyDays: 'Last 30 Days' 24 | }, 25 | ID: { 26 | today: 'Hari ini', 27 | thisMonth: 'Bulan ini', 28 | lastMonth: 'Bulan lalu', 29 | lastSevenDays: '7 Hari Terakhir', 30 | lastThirtyDays: '30 Hari Terakhir' 31 | } 32 | } 33 | 34 | const defaultCaptions = { 35 | 'title': 'Choose Dates', 36 | 'ok_button': 'Apply' 37 | } 38 | 39 | const defaultStyle = { 40 | daysWeeks: 'calendar_weeks', 41 | days: 'calendar_days', 42 | daysSelected: 'calendar_days_selected', 43 | daysInRange: 'calendar_days_in-range', 44 | firstDate: 'calendar_month_left', 45 | secondDate: 'calendar_month_right', 46 | presetRanges: 'calendar_preset-ranges', 47 | dateDisabled: 'calendar_days--disabled' 48 | } 49 | 50 | const defaultPresets = function (i18n = defaultI18n) { 51 | return { 52 | today: function () { 53 | const n = new Date() 54 | const today = new Date(Date.UTC(n.getFullYear(), n.getMonth(), n.getDate(), 0, 0)) 55 | return { 56 | label: presetRangeLabel[i18n].today, 57 | active: false, 58 | dateRange: { 59 | start: today, 60 | end: today 61 | } 62 | } 63 | }, 64 | thisMonth: function () { 65 | const n = new Date() 66 | const startMonth = new Date(Date.UTC(n.getFullYear(), n.getMonth(), 1)) 67 | const endMonth = new Date(Date.UTC(n.getFullYear(), n.getMonth() + 1, 0)) 68 | return { 69 | label: presetRangeLabel[i18n].thisMonth, 70 | active: false, 71 | dateRange: { 72 | start: startMonth, 73 | end: endMonth 74 | } 75 | } 76 | }, 77 | lastMonth: function () { 78 | const n = new Date() 79 | const startMonth = new Date(Date.UTC(n.getFullYear(), n.getMonth() - 1, 1)) 80 | const endMonth = new Date(Date.UTC(n.getFullYear(), n.getMonth(), 0)) 81 | return { 82 | label: presetRangeLabel[i18n].lastMonth, 83 | active: false, 84 | dateRange: { 85 | start: startMonth, 86 | end: endMonth 87 | } 88 | } 89 | }, 90 | last7days: function () { 91 | const n = new Date() 92 | const start = new Date(Date.UTC(n.getFullYear(), n.getMonth(), n.getDate() - 6)) 93 | const end = new Date(Date.UTC(n.getFullYear(), n.getMonth(), n.getDate())) 94 | return { 95 | label: presetRangeLabel[i18n].lastSevenDays, 96 | active: false, 97 | dateRange: { 98 | start: start, 99 | end: end 100 | } 101 | } 102 | }, 103 | last30days: function () { 104 | const n = new Date() 105 | const start = new Date(Date.UTC(n.getFullYear(), n.getMonth(), n.getDate() - 30)) 106 | const end = new Date(Date.UTC(n.getFullYear(), n.getMonth(), n.getDate())) 107 | return { 108 | label: presetRangeLabel[i18n].lastThirtyDays, 109 | active: false, 110 | dateRange: { 111 | start: start, 112 | end: end 113 | } 114 | } 115 | } 116 | } 117 | } 118 | 119 | export default { 120 | name: 'vue-rangedate-picker', 121 | props: { 122 | configs: { 123 | type: Object, 124 | default: () => defaultConfig 125 | }, 126 | i18n: { 127 | type: String, 128 | default: defaultI18n 129 | }, 130 | months: { 131 | type: Array, 132 | default: () => null 133 | }, 134 | shortDays: { 135 | type: Array, 136 | default: () => null 137 | }, 138 | // options for captions are: title, ok_button 139 | captions: { 140 | type: Object, 141 | default: () => defaultCaptions 142 | }, 143 | format: { 144 | type: String, 145 | default: 'DD MMM YYYY' 146 | }, 147 | styles: { 148 | type: Object, 149 | default: () => {} 150 | }, 151 | initRange: { 152 | type: Object, 153 | default: () => null 154 | }, 155 | startActiveMonth: { 156 | type: Number, 157 | default: new Date().getMonth() 158 | }, 159 | startActiveYear: { 160 | type: Number, 161 | default: new Date().getFullYear() 162 | }, 163 | presetRanges: { 164 | type: Object, 165 | default: () => null 166 | }, 167 | compact: { 168 | type: String, 169 | default: 'false' 170 | }, 171 | righttoleft: { 172 | type: String, 173 | default: 'false' 174 | } 175 | }, 176 | data () { 177 | return { 178 | dateRange: {}, 179 | numOfDays: 7, 180 | isFirstChoice: true, 181 | isOpen: false, 182 | presetActive: '', 183 | showMonth: false, 184 | activeMonthStart: this.startActiveMonth, 185 | activeYearStart: this.startActiveYear, 186 | activeYearEnd: this.startActiveYear 187 | } 188 | }, 189 | created () { 190 | if (this.isCompact) { 191 | this.isOpen = true 192 | } 193 | if (this.activeMonthStart === 11) this.activeYearEnd = this.activeYearStart + 1 194 | }, 195 | watch: { 196 | startNextActiveMonth: function (value) { 197 | if (value === 0) this.activeYearEnd = this.activeYearStart + 1 198 | } 199 | }, 200 | computed: { 201 | monthsLocale: function () { 202 | return this.months || availableMonths[this.i18n] 203 | }, 204 | shortDaysLocale: function () { 205 | return this.shortDays || availableShortDays[this.i18n] 206 | }, 207 | s: function () { 208 | return Object.assign({}, defaultStyle, this.style) 209 | }, 210 | startMonthDay: function () { 211 | return new Date(Date.UTC(this.activeYearStart, this.activeMonthStart, 1)).getDay() 212 | }, 213 | startNextMonthDay: function () { 214 | return new Date(Date.UTC(this.activeYearStart, this.startNextActiveMonth, 1)).getDay() 215 | }, 216 | endMonthDate: function () { 217 | return new Date(Date.UTC(this.activeYearEnd, this.startNextActiveMonth, 0)).getDate() 218 | }, 219 | endNextMonthDate: function () { 220 | return new Date(Date.UTC(this.activeYearEnd, this.activeMonthStart + 2, 0)).getDate() 221 | }, 222 | startNextActiveMonth: function () { 223 | return this.activeMonthStart >= 11 ? 0 : this.activeMonthStart + 1 224 | }, 225 | finalPresetRanges: function () { 226 | const tmp = {} 227 | const presets = this.presetRanges || defaultPresets(this.i18n) 228 | for (const i in presets) { 229 | const item = presets[i] 230 | let plainItem = item 231 | if (typeof item === 'function') { 232 | plainItem = item() 233 | } 234 | tmp[i] = plainItem 235 | } 236 | return tmp 237 | }, 238 | isCompact: function () { 239 | return this.compact === 'true' 240 | }, 241 | isRighttoLeft: function () { 242 | return this.righttoleft === 'true' 243 | } 244 | }, 245 | methods: { 246 | toggleCalendar: function () { 247 | if (this.isCompact) { 248 | this.showMonth = !this.showMonth 249 | return 250 | } 251 | this.isOpen = !this.isOpen 252 | this.showMonth = !this.showMonth 253 | return 254 | }, 255 | getDateString: function (date, format = this.format) { 256 | if (!date) { 257 | return null 258 | } 259 | const dateparse = new Date(Date.parse(date)) 260 | return fecha.format(new Date(Date.UTC(dateparse.getFullYear(), dateparse.getMonth(), dateparse.getDate())), format) 261 | }, 262 | getDayIndexInMonth: function (r, i, startMonthDay) { 263 | const date = (this.numOfDays * (r - 1)) + i 264 | return date - startMonthDay 265 | }, 266 | getDayCell (r, i, startMonthDay, endMonthDate) { 267 | const result = this.getDayIndexInMonth(r, i, startMonthDay) 268 | // bound by > 0 and < last day of month 269 | return result > 0 && result <= endMonthDate ? result : ' ' 270 | }, 271 | getNewDateRange (result, activeMonth, activeYear) { 272 | const newData = {} 273 | let key = 'start' 274 | if (!this.isFirstChoice) { 275 | key = 'end' 276 | } else { 277 | newData['end'] = null 278 | } 279 | const resultDate = new Date(Date.UTC(activeYear, activeMonth, result)) 280 | if (!this.isFirstChoice && resultDate < this.dateRange.start) { 281 | this.isFirstChoice = false 282 | return { start: resultDate } 283 | } 284 | 285 | // toggle first choice 286 | this.isFirstChoice = !this.isFirstChoice 287 | newData[key] = resultDate 288 | return newData 289 | }, 290 | selectFirstItem (r, i) { 291 | const result = this.getDayIndexInMonth(r, i, this.startMonthDay) 292 | this.dateRange = Object.assign({}, this.dateRange, this.getNewDateRange(result, this.activeMonthStart, 293 | this.activeYearStart)) 294 | if (this.dateRange.start && this.dateRange.end) { 295 | this.presetActive = '' 296 | if (this.isCompact) { 297 | this.showMonth = false 298 | } 299 | } 300 | }, 301 | selectSecondItem (r, i) { 302 | const result = this.getDayIndexInMonth(r, i, this.startNextMonthDay) 303 | this.dateRange = Object.assign({}, this.dateRange, this.getNewDateRange(result, this.startNextActiveMonth, 304 | this.activeYearEnd)) 305 | if (this.dateRange.start && this.dateRange.end) { 306 | this.presetActive = '' 307 | } 308 | }, 309 | isDateSelected (r, i, key, startMonthDay, endMonthDate) { 310 | const result = this.getDayIndexInMonth(r, i, startMonthDay) 311 | if (result < 1 || result > endMonthDate) return false 312 | 313 | let currDate = null 314 | if (key === 'first') { 315 | currDate = new Date(Date.UTC(this.activeYearStart, this.activeMonthStart, result)) 316 | } else { 317 | currDate = new Date(Date.UTC(this.activeYearEnd, this.startNextActiveMonth, result)) 318 | } 319 | return (this.dateRange.start && this.dateRange.start.getTime() === currDate.getTime()) || 320 | (this.dateRange.end && this.dateRange.end.getTime() === currDate.getTime()) 321 | }, 322 | isDateInRange (r, i, key, startMonthDay, endMonthDate) { 323 | const result = this.getDayIndexInMonth(r, i, startMonthDay) 324 | if (result < 2 || result > endMonthDate) return false 325 | 326 | let currDate = null 327 | if (key === 'first') { 328 | currDate = new Date(Date.UTC(this.activeYearStart, this.activeMonthStart, result)) 329 | } else { 330 | currDate = new Date(Date.UTC(this.activeYearEnd, this.startNextActiveMonth, result)) 331 | } 332 | return (this.dateRange.start && this.dateRange.start.getTime() < currDate.getTime()) && 333 | (this.dateRange.end && this.dateRange.end.getTime() > currDate.getTime()) 334 | }, 335 | isDateDisabled (r, i, startMonthDay, endMonthDate) { 336 | const result = this.getDayIndexInMonth(r, i, startMonthDay) 337 | // bound by > 0 and < last day of month 338 | return !(result > 0 && result <= endMonthDate) 339 | }, 340 | goPrevMonth () { 341 | const prevMonth = new Date(Date.UTC(this.activeYearStart, this.activeMonthStart, 0)) 342 | this.activeMonthStart = prevMonth.getMonth() 343 | this.activeYearStart = prevMonth.getFullYear() 344 | this.activeYearEnd = prevMonth.getFullYear() 345 | }, 346 | goNextMonth () { 347 | const nextMonth = new Date(Date.UTC(this.activeYearEnd, this.startNextActiveMonth, 1)) 348 | this.activeMonthStart = nextMonth.getMonth() 349 | this.activeYearStart = nextMonth.getFullYear() 350 | this.activeYearEnd = nextMonth.getFullYear() 351 | }, 352 | updatePreset (item) { 353 | this.presetActive = item.label 354 | this.dateRange = item.dateRange 355 | // update start active month 356 | this.activeMonthStart = this.dateRange.start.getMonth() 357 | this.activeYearStart = this.dateRange.start.getFullYear() 358 | this.activeYearEnd = this.dateRange.end.getFullYear() 359 | }, 360 | setDateValue: function () { 361 | this.$emit('selected', this.dateRange) 362 | if (!this.isCompact) { 363 | this.toggleCalendar() 364 | } 365 | } 366 | } 367 | } 368 | -------------------------------------------------------------------------------- /dist/vue-rangedate-picker.min.js: -------------------------------------------------------------------------------- 1 | window.VueRangedatePicker=function(t){function e(a){if(n[a])return n[a].exports;var r=n[a]={i:a,l:!1,exports:{}};return t[a].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,a){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:a})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=11)}([function(t,e,n){t.exports=!n(1)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){"use strict";var a=n(12),r=n.n(a),i=n(42),o=n.n(i),s={},c={EN:["January","February","March","April","May","June","July","August","September","October","November","December"],ID:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},u={EN:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ID:["Min","Sen","Sel","Rab","Kam","Jum","Sab"]},l={EN:{today:"Today",thisMonth:"This Month",lastMonth:"Last Month",lastSevenSays:"Last 7 Days",lastThirtyDays:"Last 30 Days"},ID:{today:"Hari ini",thisMonth:"Bulan ini",lastMonth:"Bulan lalu",lastSevenDays:"7 Hari Terakhir",lastThirtyDays:"30 Hari Terakhir"}},d={title:"Choose Dates",ok_button:"Apply"},f={daysWeeks:"calendar_weeks",days:"calendar_days",daysSelected:"calendar_days_selected",daysInRange:"calendar_days_in-range",firstDate:"calendar_month_left",secondDate:"calendar_month_right",presetRanges:"calendar_preset-ranges",dateDisabled:"calendar_days--disabled"},h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ID";return{today:function(){var e=new Date,n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),0,0));return{label:l[t].today,active:!1,dateRange:{start:n,end:n}}},thisMonth:function(){var e=new Date,n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),1)),a=new Date(Date.UTC(e.getFullYear(),e.getMonth()+1,0));return{label:l[t].thisMonth,active:!1,dateRange:{start:n,end:a}}},lastMonth:function(){var e=new Date,n=new Date(Date.UTC(e.getFullYear(),e.getMonth()-1,1)),a=new Date(Date.UTC(e.getFullYear(),e.getMonth(),0));return{label:l[t].lastMonth,active:!1,dateRange:{start:n,end:a}}},last7days:function(){var e=new Date,n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-6)),a=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()));return{label:l[t].lastSevenDays,active:!1,dateRange:{start:n,end:a}}},last30days:function(){var e=new Date,n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-30)),a=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()));return{label:l[t].lastThirtyDays,active:!1,dateRange:{start:n,end:a}}}}};e.a={name:"vue-rangedate-picker",props:{configs:{type:Object,default:function(){return s}},i18n:{type:String,default:"ID"},months:{type:Array,default:function(){return null}},shortDays:{type:Array,default:function(){return null}},captions:{type:Object,default:function(){return d}},format:{type:String,default:"DD MMM YYYY"},styles:{type:Object,default:function(){}},initRange:{type:Object,default:function(){return null}},startActiveMonth:{type:Number,default:(new Date).getMonth()},startActiveYear:{type:Number,default:(new Date).getFullYear()},presetRanges:{type:Object,default:function(){return null}},compact:{type:String,default:"false"},righttoleft:{type:String,default:"false"}},data:function(){return{dateRange:{},numOfDays:7,isFirstChoice:!0,isOpen:!1,presetActive:"",showMonth:!1,activeMonthStart:this.startActiveMonth,activeYearStart:this.startActiveYear,activeYearEnd:this.startActiveYear}},created:function(){this.isCompact&&(this.isOpen=!0),11===this.activeMonthStart&&(this.activeYearEnd=this.activeYearStart+1)},watch:{startNextActiveMonth:function(t){0===t&&(this.activeYearEnd=this.activeYearStart+1)}},computed:{monthsLocale:function(){return this.months||c[this.i18n]},shortDaysLocale:function(){return this.shortDays||u[this.i18n]},s:function(){return r()({},f,this.style)},startMonthDay:function(){return new Date(Date.UTC(this.activeYearStart,this.activeMonthStart,1)).getDay()},startNextMonthDay:function(){return new Date(Date.UTC(this.activeYearStart,this.startNextActiveMonth,1)).getDay()},endMonthDate:function(){return new Date(Date.UTC(this.activeYearEnd,this.startNextActiveMonth,0)).getDate()},endNextMonthDate:function(){return new Date(Date.UTC(this.activeYearEnd,this.activeMonthStart+2,0)).getDate()},startNextActiveMonth:function(){return this.activeMonthStart>=11?0:this.activeMonthStart+1},finalPresetRanges:function(){var t={},e=this.presetRanges||h(this.i18n);for(var n in e){var a=e[n],r=a;"function"==typeof a&&(r=a()),t[n]=r}return t},isCompact:function(){return"true"===this.compact},isRighttoLeft:function(){return"true"===this.righttoleft}},methods:{toggleCalendar:function(){if(this.isCompact)return void(this.showMonth=!this.showMonth);this.isOpen=!this.isOpen,this.showMonth=!this.showMonth},getDateString:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.format;if(!t)return null;var n=new Date(Date.parse(t));return o.a.format(new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate())),e)},getDayIndexInMonth:function(t,e,n){return this.numOfDays*(t-1)+e-n},getDayCell:function(t,e,n,a){var r=this.getDayIndexInMonth(t,e,n);return r>0&&r<=a?r:" "},getNewDateRange:function(t,e,n){var a={},r="start";this.isFirstChoice?a.end=null:r="end";var i=new Date(Date.UTC(n,e,t));return!this.isFirstChoice&&ir)return!1;var o=null;return o="first"===n?new Date(Date.UTC(this.activeYearStart,this.activeMonthStart,i)):new Date(Date.UTC(this.activeYearEnd,this.startNextActiveMonth,i)),this.dateRange.start&&this.dateRange.start.getTime()===o.getTime()||this.dateRange.end&&this.dateRange.end.getTime()===o.getTime()},isDateInRange:function(t,e,n,a,r){var i=this.getDayIndexInMonth(t,e,a);if(i<2||i>r)return!1;var o=null;return o="first"===n?new Date(Date.UTC(this.activeYearStart,this.activeMonthStart,i)):new Date(Date.UTC(this.activeYearEnd,this.startNextActiveMonth,i)),this.dateRange.start&&this.dateRange.start.getTime()o.getTime()},isDateDisabled:function(t,e,n,a){var r=this.getDayIndexInMonth(t,e,n);return!(r>0&&r<=a)},goPrevMonth:function(){var t=new Date(Date.UTC(this.activeYearStart,this.activeMonthStart,0));this.activeMonthStart=t.getMonth(),this.activeYearStart=t.getFullYear(),this.activeYearEnd=t.getFullYear()},goNextMonth:function(){var t=new Date(Date.UTC(this.activeYearEnd,this.startNextActiveMonth,1));this.activeMonthStart=t.getMonth(),this.activeYearStart=t.getFullYear(),this.activeYearEnd=t.getFullYear()},updatePreset:function(t){this.presetActive=t.label,this.dateRange=t.dateRange,this.activeMonthStart=this.dateRange.start.getMonth(),this.activeYearStart=this.dateRange.start.getFullYear(),this.activeYearEnd=this.dateRange.end.getFullYear()},setDateValue:function(){this.$emit("selected",this.dateRange),this.isCompact||this.toggleCalendar()}}}},function(t,e){var n=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var a=n(17);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==a(t)?t.split(""):Object(t)}},function(t,e){var n=Math.ceil,a=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?a:n)(t)}},function(t,e,n){var a=n(7),r=n(6);t.exports=function(t){return a(r(t))}},function(t,e,n){"use strict";function a(t){o||n(45)}var r=n(4),i=n(44),o=!1,s=n(43),c=a,u=s(r.a,i.a,!1,c,"data-v-5e837f70",null);u.options.__file="src/RangedatePicker.vue",e.a=u.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(10);e.default={install:function(t,e){t.component(a.a.name,a.a)}}},function(t,e,n){t.exports={default:n(13),__esModule:!0}},function(t,e,n){n(39),t.exports=n(5).Object.assign},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var a=n(3);t.exports=function(t){if(!a(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var a=n(9),r=n(35),i=n(34);t.exports=function(t){return function(e,n,o){var s,c=a(e),u=r(c.length),l=i(o,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var a=n(14);t.exports=function(t,e,n){if(a(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,a){return t.call(e,n,a)};case 3:return function(n,a,r){return t.call(e,n,a,r)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var a=n(3),r=n(2).document,i=a(r)&&a(r.createElement);t.exports=function(t){return i?r.createElement(t):{}}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var a=n(2),r=n(5),i=n(18),o=n(23),s=function(t,e,n){var c,u,l,d=t&s.F,f=t&s.G,h=t&s.S,g=t&s.P,p=t&s.B,v=t&s.W,M=f?r:r[e]||(r[e]={}),m=M.prototype,y=f?a:h?a[e]:(a[e]||{}).prototype;f&&(n=e);for(c in n)(u=!d&&y&&void 0!==y[c])&&c in M||(l=u?y[c]:n[c],M[c]=f&&"function"!=typeof y[c]?n[c]:p&&u?i(l,a):v&&y[c]==l?function(t){var e=function(e,n,a){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,a)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):g&&"function"==typeof l?i(Function.call,l):l,g&&((M.virtual||(M.virtual={}))[c]=l,t&s.R&&m&&!m[c]&&o(m,c,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var a=n(26),r=n(31);t.exports=n(0)?function(t,e,n){return a.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){t.exports=!n(0)&&!n(1)(function(){return 7!=Object.defineProperty(n(19)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var a=n(29),r=n(27),i=n(30),o=n(36),s=n(7),c=Object.assign;t.exports=!c||n(1)(function(){var t={},e={},n=Symbol(),a="abcdefghijklmnopqrst";return t[n]=7,a.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=a})?function(t,e){for(var n=o(t),c=arguments.length,u=1,l=r.f,d=i.f;c>u;)for(var f,h=s(arguments[u++]),g=l?a(h).concat(l(h)):a(h),p=g.length,v=0;p>v;)d.call(h,f=g[v++])&&(n[f]=h[f]);return n}:c},function(t,e,n){var a=n(15),r=n(24),i=n(37),o=Object.defineProperty;e.f=n(0)?Object.defineProperty:function(t,e,n){if(a(t),e=i(e,!0),a(n),r)try{return o(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var a=n(22),r=n(9),i=n(16)(!1),o=n(32)("IE_PROTO");t.exports=function(t,e){var n,s=r(t),c=0,u=[];for(n in s)n!=o&&a(s,n)&&u.push(n);for(;e.length>c;)a(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},function(t,e,n){var a=n(28),r=n(20);t.exports=Object.keys||function(t){return a(t,r)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var a=n(33)("keys"),r=n(38);t.exports=function(t){return a[t]||(a[t]=r(t))}},function(t,e,n){var a=n(2),r=a["__core-js_shared__"]||(a["__core-js_shared__"]={});t.exports=function(t){return r[t]||(r[t]={})}},function(t,e,n){var a=n(8),r=Math.max,i=Math.min;t.exports=function(t,e){return t=a(t),t<0?r(t+e,0):i(t,e)}},function(t,e,n){var a=n(8),r=Math.min;t.exports=function(t){return t>0?r(a(t),9007199254740991):0}},function(t,e,n){var a=n(6);t.exports=function(t){return Object(a(t))}},function(t,e,n){var a=n(3);t.exports=function(t,e){if(!a(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!a(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!a(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!a(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){var n=0,a=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+a).toString(36))}},function(t,e,n){var a=n(21);a(a.S+a.F,"Object",{assign:n(25)})},function(t,e,n){e=t.exports=n(41)(!1),e.push([t.i,'\n.input-date[data-v-5e837f70] {\n display: block;\n border: 1px solid #ccc;\n padding: 5px;\n font-size: 14px;\n width: 230px;\n cursor: pointer;\n}\n.input-date[data-v-5e837f70]::after {\n content: "\\25BC";\n float: right;\n font-size: smaller;\n}\n.active-preset[data-v-5e837f70] {\n border: 1px solid #0096d9;\n color: #0096d9;\n border-radius: 3px;\n}\n.months-text[data-v-5e837f70] {\n text-align: center;\n font-weight: bold;\n}\n.months-text .left[data-v-5e837f70] {\n float: left;\n cursor: pointer;\n width: 16px;\n height: 16px;\n background-image: url("data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMS4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDMxLjQ5NCAzMS40OTQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMxLjQ5NCAzMS40OTQ7IiB4bWw6c3BhY2U9InByZXNlcnZlIiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4Ij4KPHBhdGggZD0iTTEwLjI3Myw1LjAwOWMwLjQ0NC0wLjQ0NCwxLjE0My0wLjQ0NCwxLjU4NywwYzAuNDI5LDAuNDI5LDAuNDI5LDEuMTQzLDAsMS41NzFsLTguMDQ3LDguMDQ3aDI2LjU1NCAgYzAuNjE5LDAsMS4xMjcsMC40OTIsMS4xMjcsMS4xMTFjMCwwLjYxOS0wLjUwOCwxLjEyNy0xLjEyNywxLjEyN0gzLjgxM2w4LjA0Nyw4LjAzMmMwLjQyOSwwLjQ0NCwwLjQyOSwxLjE1OSwwLDEuNTg3ICBjLTAuNDQ0LDAuNDQ0LTEuMTQzLDAuNDQ0LTEuNTg3LDBsLTkuOTUyLTkuOTUyYy0wLjQyOS0wLjQyOS0wLjQyOS0xLjE0MywwLTEuNTcxTDEwLjI3Myw1LjAwOXoiIGZpbGw9IiMwMDZERjAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==");\n}\n.months-text .right[data-v-5e837f70] {\n float: right;\n cursor: pointer;\n width: 16px;\n height: 16px;\n background-image: url("data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMS4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDMxLjQ5IDMxLjQ5IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMS40OSAzMS40OTsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNMjEuMjA1LDUuMDA3Yy0wLjQyOS0wLjQ0NC0xLjE0My0wLjQ0NC0xLjU4NywwYy0wLjQyOSwwLjQyOS0wLjQyOSwxLjE0MywwLDEuNTcxbDguMDQ3LDguMDQ3SDEuMTExICBDMC40OTIsMTQuNjI2LDAsMTUuMTE4LDAsMTUuNzM3YzAsMC42MTksMC40OTIsMS4xMjcsMS4xMTEsMS4xMjdoMjYuNTU0bC04LjA0Nyw4LjAzMmMtMC40MjksMC40NDQtMC40MjksMS4xNTksMCwxLjU4NyAgYzAuNDQ0LDAuNDQ0LDEuMTU5LDAuNDQ0LDEuNTg3LDBsOS45NTItOS45NTJjMC40NDQtMC40MjksMC40NDQtMS4xNDMsMC0xLjU3MUwyMS4yMDUsNS4wMDd6IiBmaWxsPSIjMDA2REYwIi8+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=");\n}\n.calendar-root[data-v-5e837f70],\n.calendar-title[data-v-5e837f70] {\n font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n}\n.calendar-right-to-left[data-v-5e837f70] {\n margin-left: -460px;\n}\n.calendar[data-v-5e837f70] {\n display: block;\n font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n width: 700px;\n font-size: 12px;\n height: 300px;\n box-shadow: -3px 4px 12px -1px #ccc;\n background: #fff;\n position: absolute;\n z-index: 9;\n}\n.calendar-head h2[data-v-5e837f70] {\n padding: 20px 0 0 20px;\n margin: 0;\n}\n.close[data-v-5e837f70]:hover {\n cursor: pointer;\n}\n.close[data-v-5e837f70]{\n float: right;\n padding: 0 10px;\n margin-top: -35px;\n font-size: 32px;\n font-weight: normal;\n}\n.calendar ul[data-v-5e837f70] {\n list-style-type: none;\n}\n.calendar-wrap[data-v-5e837f70] {\n display: inline-block;\n float: left;\n width: 75%;\n padding: 10px;\n}\n.calendar-range[data-v-5e837f70] {\n float: left;\n padding: 0 12px;\n border-left: 1px solid #ccc;\n margin: -2px;\n}\n.calendar-left-mobile[data-v-5e837f70] {\n width: 100% !important;\n}\n.calendar_month_left[data-v-5e837f70],\n.calendar_month_right[data-v-5e837f70] {\n float: left;\n width: 43%;\n padding: 10px;\n margin: 5px;\n}\n.calendar_weeks[data-v-5e837f70] {\n margin: 0;\n padding: 10px 0;\n width: auto;\n}\n.calendar_weeks li[data-v-5e837f70] {\n display: inline-block;\n width: 13.6%;\n color: #999;\n text-align: center;\n}\n.calendar_days[data-v-5e837f70] {\n margin: 0;\n padding: 0;\n}\n.calendar_days li[data-v-5e837f70] {\n display: inline-block;\n width: 13.6%;\n color: #333;\n text-align: center;\n cursor: pointer;\n line-height: 2em;\n}\n.calendar_preset li[data-v-5e837f70] {\n line-height: 2.6em;\n width: auto;\n display: block;\n}\n.calendar_days li[data-v-5e837f70]:hover {\n background: #eee;\n color: #000;\n}\nli.calendar_days--disabled[data-v-5e837f70]{\n pointer-events: none;\n}\nli.calendar_days_selected[data-v-5e837f70] {\n background: #005a82;\n color: #fff;\n}\nli.calendar_days_in-range[data-v-5e837f70] {\n background: #0096d9;\n color: #fff;\n}\n.calendar_preset[data-v-5e837f70] {\n padding: 0;\n}\n.calendar_preset li.calendar_preset-ranges[data-v-5e837f70] {\n padding: 0 30px 0 10px;\n margin-bottom: 5px;\n cursor: pointer;\n margin-top: 1px;\n}\n.calendar_preset li.calendar_preset-ranges[data-v-5e837f70]:hover {\n background: #eee;\n}\n.calendar-mobile[data-v-5e837f70] {\n width: 260px;\n z-index: 1;\n box-shadow: none;\n}\n.calendar-range-mobile[data-v-5e837f70] {\n width: 90%;\n padding: 2px;\n border-left: none;\n margin: -20px 0;\n}\n.calendar-btn-apply[data-v-5e837f70] {\n width: 100%;\n background: #f7931e;\n color: #fff;\n border: none;\n padding: 5px;\n font-size: 14px;\n}\n',""])},function(t,e){function n(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=a(r);return[n].concat(r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"})).concat([i]).join("\n")}return[n].join("\n")}function a(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var a=n(e,t);return e[2]?"@media "+e[2]+"{"+a+"}":a}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var a={},r=0;r3?0:(t-t%10!=10)*t%10]}};var D={D:function(t){return t.getDate()},DD:function(t){return s(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return t.getDay()},dd:function(t){return s(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return t.getMonth()+1},MM:function(t){return s(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return String(t.getFullYear()).substr(2)},YYYY:function(t){return t.getFullYear()},h:function(t){return t.getHours()%12||12},hh:function(t){return s(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return s(t.getHours())},m:function(t){return t.getMinutes()},mm:function(t){return s(t.getMinutes())},s:function(t){return t.getSeconds()},ss:function(t){return s(t.getSeconds())},S:function(t){return Math.round(t.getMilliseconds()/100)},SS:function(t){return s(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return s(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+s(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)}},x={D:[l,function(t,e){t.day=e}],Do:[new RegExp(l.source+h.source),function(t,e){t.day=parseInt(e,10)}],M:[l,function(t,e){t.month=e-1}],YY:[l,function(t,e){var n=new Date,a=+(""+n.getFullYear()).substr(0,2);t.year=""+(e>68?a-1:a)+e}],h:[l,function(t,e){t.hour=e}],m:[l,function(t,e){t.minute=e}],s:[l,function(t,e){t.second=e}],YYYY:[f,function(t,e){t.year=e}],S:[/\d/,function(t,e){t.millisecond=100*e}],SS:[/\d{2}/,function(t,e){t.millisecond=10*e}],SSS:[d,function(t,e){t.millisecond=e}],d:[l,p],ddd:[h,p],MMM:[h,o("monthNamesShort")],MMMM:[h,o("monthNames")],a:[h,function(t,e,n){var a=e.toLowerCase();a===n.amPm[0]?t.isPm=!1:a===n.amPm[1]&&(t.isPm=!0)}],ZZ:[/([\+\-]\d\d:?\d\d|Z)/,function(t,e){"Z"===e&&(e="+00:00");var n,a=(e+"").match(/([\+\-]|\d\d)/gi);a&&(n=60*a[1]+parseInt(a[2],10),t.timezoneOffset="+"===a[0]?n:-n)}]};x.dd=x.d,x.dddd=x.ddd,x.DD=x.D,x.mm=x.m,x.hh=x.H=x.HH=x.h,x.MM=x.M,x.ss=x.s,x.A=x.a,c.masks={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},c.format=function(t,e,n){var a=n||c.i18n;if("number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date in fecha.format");e=c.masks[e]||e||c.masks.default;var r=[];return e=e.replace(g,function(t,e){return r.push(e),"??"}),e=e.replace(u,function(e){return e in D?D[e](t,a):e.slice(1,e.length-1)}),e.replace(/\?\?/g,function(){return r.shift()})},c.parse=function(t,e,n){var a=n||c.i18n;if("string"!=typeof e)throw new Error("Invalid format in fecha.parse");if(e=c.masks[e]||e,t.length>1e3)return!1;var r=!0,i={};if(e.replace(u,function(e){if(x[e]){var n=x[e],o=t.search(n[0]);~o?t.replace(n[0],function(e){return n[1](i,e,a),t=t.substr(o+e.length),e}):r=!1}return x[e]?"":e.slice(1,e.length-1)}),!r)return!1;var o=new Date;!0===i.isPm&&null!=i.hour&&12!=+i.hour?i.hour=+i.hour+12:!1===i.isPm&&12==+i.hour&&(i.hour=0);var s;return null!=i.timezoneOffset?(i.minute=+(i.minute||0)-+i.timezoneOffset,s=new Date(Date.UTC(i.year||o.getFullYear(),i.month||0,i.day||1,i.hour||0,i.minute||0,i.second||0,i.millisecond||0))):s=new Date(i.year||o.getFullYear(),i.month||0,i.day||1,i.hour||0,i.minute||0,i.second||0,i.millisecond||0),s},void 0!==t&&t.exports?t.exports=c:void 0!==(a=function(){return c}.call(e,n,e,t))&&(t.exports=a)}()},function(t,e){t.exports=function(t,e,n,a,r,i){var o,s=t=t||{},c=typeof t.default;"object"!==c&&"function"!==c||(o=t,s=t.default);var u="function"==typeof s?s.options:s;e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),n&&(u.functional=!0),r&&(u._scopeId=r);var l;if(i?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},u._ssrRegister=l):a&&(l=a),l){var d=u.functional,f=d?u.render:u.beforeCreate;d?(u._injectStyles=l,u.render=function(t,e){return l.call(e),f(t,e)}):u.beforeCreate=f?[].concat(f,l):[l]}return{esModule:o,exports:s,options:u}}},function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"calendar-root"},[n("div",{staticClass:"input-date",on:{click:function(e){t.toggleCalendar()}}},[t._v(" "+t._s(t.getDateString(t.dateRange.start))+" - "+t._s(t.getDateString(t.dateRange.end)))]),t._v(" "),t.isOpen?n("div",{staticClass:"calendar",class:{"calendar-mobile ":t.isCompact,"calendar-right-to-left":t.isRighttoLeft}},[t.isCompact?t._e():n("div",{staticClass:"calendar-head"},[n("h2",[t._v(t._s(t.captions.title))]),t._v(" "),n("i",{staticClass:"close",on:{click:function(e){t.toggleCalendar()}}},[t._v("×")])]),t._v(" "),n("div",{staticClass:"calendar-wrap"},[t.showMonth?n("div",{staticClass:"calendar_month_left",class:{"calendar-left-mobile":t.isCompact}},[n("div",{staticClass:"months-text"},[n("i",{staticClass:"left",on:{click:t.goPrevMonth}}),t._v(" "),t.isCompact?n("i",{staticClass:"right",on:{click:t.goNextMonth}}):t._e(),t._v("\n "+t._s(t.monthsLocale[t.activeMonthStart]+" "+t.activeYearStart))]),t._v(" "),n("ul",{class:t.s.daysWeeks},t._l(t.shortDaysLocale,function(e){return n("li",{key:e},[t._v(t._s(e))])})),t._v(" "),t._l(6,function(e){return n("ul",{key:e,class:[t.s.days]},t._l(t.numOfDays,function(a){return n("li",{key:a,class:[(r={},r[t.s.daysSelected]=t.isDateSelected(e,a,"first",t.startMonthDay,t.endMonthDate),r[t.s.daysInRange]=t.isDateInRange(e,a,"first",t.startMonthDay,t.endMonthDate),r[t.s.dateDisabled]=t.isDateDisabled(e,a,t.startMonthDay,t.endMonthDate),r)],domProps:{innerHTML:t._s(t.getDayCell(e,a,t.startMonthDay,t.endMonthDate))},on:{click:function(n){t.selectFirstItem(e,a)}}});var r}))})],2):t._e(),t._v(" "),t.isCompact?t._e():n("div",{staticClass:"calendar_month_right"},[n("div",{staticClass:"months-text"},[t._v("\n "+t._s(t.monthsLocale[t.startNextActiveMonth]+" "+t.activeYearEnd)+"\n "),n("i",{staticClass:"right",on:{click:t.goNextMonth}})]),t._v(" "),n("ul",{class:t.s.daysWeeks},t._l(t.shortDaysLocale,function(e){return n("li",{key:e},[t._v(t._s(e))])})),t._v(" "),t._l(6,function(e){return n("ul",{key:e,class:[t.s.days]},t._l(t.numOfDays,function(a){return n("li",{key:a,class:[(r={},r[t.s.daysSelected]=t.isDateSelected(e,a,"second",t.startNextMonthDay,t.endNextMonthDate),r[t.s.daysInRange]=t.isDateInRange(e,a,"second",t.startNextMonthDay,t.endNextMonthDate),r[t.s.dateDisabled]=t.isDateDisabled(e,a,t.startNextMonthDay,t.endNextMonthDate),r)],domProps:{innerHTML:t._s(t.getDayCell(e,a,t.startNextMonthDay,t.endNextMonthDate))},on:{click:function(n){t.selectSecondItem(e,a)}}});var r}))})],2)]),t._v(" "),t.showMonth&&t.isCompact?t._e():n("div",{staticClass:"calendar-range",class:{"calendar-range-mobile ":t.isCompact}},[n("ul",{staticClass:"calendar_preset"},[t._l(t.finalPresetRanges,function(e,a){return n("li",{key:a,staticClass:"calendar_preset-ranges",class:{"active-preset":t.presetActive===e.label},on:{click:function(n){t.updatePreset(e)}}},[t._v("\n "+t._s(e.label)+"\n ")])}),t._v(" "),n("li",[n("button",{staticClass:"calendar-btn-apply",on:{click:function(e){t.setDateValue()}}},[t._v(t._s(t.captions.ok_button))])])],2)])]):t._e()])},r=[];a._withStripped=!0;var i={render:a,staticRenderFns:r};e.a=i},function(t,e,n){var a=n(40);"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);n(46)("0e3b102e",a,!1,{})},function(t,e,n){function a(t){for(var e=0;en.parts.length&&(a.parts.length=n.parts.length)}else{for(var o=[],r=0;r0&&void 0!==arguments[0]?arguments[0]:"ID";return{today:function(){var e=new Date,n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),0,0));return{label:l[t].today,active:!1,dateRange:{start:n,end:n}}},thisMonth:function(){var e=new Date,n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),1)),a=new Date(Date.UTC(e.getFullYear(),e.getMonth()+1,0));return{label:l[t].thisMonth,active:!1,dateRange:{start:n,end:a}}},lastMonth:function(){var e=new Date,n=new Date(Date.UTC(e.getFullYear(),e.getMonth()-1,1)),a=new Date(Date.UTC(e.getFullYear(),e.getMonth(),0));return{label:l[t].lastMonth,active:!1,dateRange:{start:n,end:a}}},last7days:function(){var e=new Date,n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-6)),a=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()));return{label:l[t].lastSevenDays,active:!1,dateRange:{start:n,end:a}}},last30days:function(){var e=new Date,n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-30)),a=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()));return{label:l[t].lastThirtyDays,active:!1,dateRange:{start:n,end:a}}}}};e.a={name:"vue-rangedate-picker",props:{configs:{type:Object,default:function(){return s}},i18n:{type:String,default:"ID"},months:{type:Array,default:function(){return null}},shortDays:{type:Array,default:function(){return null}},captions:{type:Object,default:function(){return d}},format:{type:String,default:"DD MMM YYYY"},styles:{type:Object,default:function(){}},initRange:{type:Object,default:function(){return null}},startActiveMonth:{type:Number,default:(new Date).getMonth()},startActiveYear:{type:Number,default:(new Date).getFullYear()},presetRanges:{type:Object,default:function(){return null}},compact:{type:String,default:"false"},righttoleft:{type:String,default:"false"}},data:function(){return{dateRange:{},numOfDays:7,isFirstChoice:!0,isOpen:!1,presetActive:"",showMonth:!1,activeMonthStart:this.startActiveMonth,activeYearStart:this.startActiveYear,activeYearEnd:this.startActiveYear}},created:function(){this.isCompact&&(this.isOpen=!0),11===this.activeMonthStart&&(this.activeYearEnd=this.activeYearStart+1)},watch:{startNextActiveMonth:function(t){0===t&&(this.activeYearEnd=this.activeYearStart+1)}},computed:{monthsLocale:function(){return this.months||c[this.i18n]},shortDaysLocale:function(){return this.shortDays||u[this.i18n]},s:function(){return r()({},f,this.style)},startMonthDay:function(){return new Date(Date.UTC(this.activeYearStart,this.activeMonthStart,1)).getDay()},startNextMonthDay:function(){return new Date(Date.UTC(this.activeYearStart,this.startNextActiveMonth,1)).getDay()},endMonthDate:function(){return new Date(Date.UTC(this.activeYearEnd,this.startNextActiveMonth,0)).getDate()},endNextMonthDate:function(){return new Date(Date.UTC(this.activeYearEnd,this.activeMonthStart+2,0)).getDate()},startNextActiveMonth:function(){return this.activeMonthStart>=11?0:this.activeMonthStart+1},finalPresetRanges:function(){var t={},e=this.presetRanges||h(this.i18n);for(var n in e){var a=e[n],r=a;"function"==typeof a&&(r=a()),t[n]=r}return t},isCompact:function(){return"true"===this.compact},isRighttoLeft:function(){return"true"===this.righttoleft}},methods:{toggleCalendar:function(){if(this.isCompact)return void(this.showMonth=!this.showMonth);this.isOpen=!this.isOpen,this.showMonth=!this.showMonth},getDateString:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.format;if(!t)return null;var n=new Date(Date.parse(t));return o.a.format(new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate())),e)},getDayIndexInMonth:function(t,e,n){return this.numOfDays*(t-1)+e-n},getDayCell:function(t,e,n,a){var r=this.getDayIndexInMonth(t,e,n);return r>0&&r<=a?r:" "},getNewDateRange:function(t,e,n){var a={},r="start";this.isFirstChoice?a.end=null:r="end";var i=new Date(Date.UTC(n,e,t));return!this.isFirstChoice&&ir)return!1;var o=null;return o="first"===n?new Date(Date.UTC(this.activeYearStart,this.activeMonthStart,i)):new Date(Date.UTC(this.activeYearEnd,this.startNextActiveMonth,i)),this.dateRange.start&&this.dateRange.start.getTime()===o.getTime()||this.dateRange.end&&this.dateRange.end.getTime()===o.getTime()},isDateInRange:function(t,e,n,a,r){var i=this.getDayIndexInMonth(t,e,a);if(i<2||i>r)return!1;var o=null;return o="first"===n?new Date(Date.UTC(this.activeYearStart,this.activeMonthStart,i)):new Date(Date.UTC(this.activeYearEnd,this.startNextActiveMonth,i)),this.dateRange.start&&this.dateRange.start.getTime()o.getTime()},isDateDisabled:function(t,e,n,a){var r=this.getDayIndexInMonth(t,e,n);return!(r>0&&r<=a)},goPrevMonth:function(){var t=new Date(Date.UTC(this.activeYearStart,this.activeMonthStart,0));this.activeMonthStart=t.getMonth(),this.activeYearStart=t.getFullYear(),this.activeYearEnd=t.getFullYear()},goNextMonth:function(){var t=new Date(Date.UTC(this.activeYearEnd,this.startNextActiveMonth,1));this.activeMonthStart=t.getMonth(),this.activeYearStart=t.getFullYear(),this.activeYearEnd=t.getFullYear()},updatePreset:function(t){this.presetActive=t.label,this.dateRange=t.dateRange,this.activeMonthStart=this.dateRange.start.getMonth(),this.activeYearStart=this.dateRange.start.getFullYear(),this.activeYearEnd=this.dateRange.end.getFullYear()},setDateValue:function(){this.$emit("selected",this.dateRange),this.isCompact||this.toggleCalendar()}}}},function(t,e,n){t.exports=!n(2)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var n=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var a=n(18);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==a(t)?t.split(""):Object(t)}},function(t,e){var n=Math.ceil,a=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?a:n)(t)}},function(t,e,n){var a=n(7),r=n(6);t.exports=function(t){return a(r(t))}},function(t,e){t.exports=function(t,e,n,a,r,i){var o,s=t=t||{},c=typeof t.default;"object"!==c&&"function"!==c||(o=t,s=t.default);var u="function"==typeof s?s.options:s;e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),n&&(u.functional=!0),r&&(u._scopeId=r);var l;if(i?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},u._ssrRegister=l):a&&(l=a),l){var d=u.functional,f=d?u.render:u.beforeCreate;d?(u._injectStyles=l,u.render=function(t,e){return l.call(e),f(t,e)}):u.beforeCreate=f?[].concat(f,l):[l]}return{esModule:o,exports:s,options:u}}},function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"calendar-root"},[n("div",{staticClass:"input-date",on:{click:function(e){t.toggleCalendar()}}},[t._v(" "+t._s(t.getDateString(t.dateRange.start))+" - "+t._s(t.getDateString(t.dateRange.end)))]),t._v(" "),t.isOpen?n("div",{staticClass:"calendar",class:{"calendar-mobile ":t.isCompact,"calendar-right-to-left":t.isRighttoLeft}},[t.isCompact?t._e():n("div",{staticClass:"calendar-head"},[n("h2",[t._v(t._s(t.captions.title))]),t._v(" "),n("i",{staticClass:"close",on:{click:function(e){t.toggleCalendar()}}},[t._v("×")])]),t._v(" "),n("div",{staticClass:"calendar-wrap"},[t.showMonth?n("div",{staticClass:"calendar_month_left",class:{"calendar-left-mobile":t.isCompact}},[n("div",{staticClass:"months-text"},[n("i",{staticClass:"left",on:{click:t.goPrevMonth}}),t._v(" "),t.isCompact?n("i",{staticClass:"right",on:{click:t.goNextMonth}}):t._e(),t._v("\n "+t._s(t.monthsLocale[t.activeMonthStart]+" "+t.activeYearStart))]),t._v(" "),n("ul",{class:t.s.daysWeeks},t._l(t.shortDaysLocale,function(e){return n("li",{key:e},[t._v(t._s(e))])})),t._v(" "),t._l(6,function(e){return n("ul",{key:e,class:[t.s.days]},t._l(t.numOfDays,function(a){return n("li",{key:a,class:[(r={},r[t.s.daysSelected]=t.isDateSelected(e,a,"first",t.startMonthDay,t.endMonthDate),r[t.s.daysInRange]=t.isDateInRange(e,a,"first",t.startMonthDay,t.endMonthDate),r[t.s.dateDisabled]=t.isDateDisabled(e,a,t.startMonthDay,t.endMonthDate),r)],domProps:{innerHTML:t._s(t.getDayCell(e,a,t.startMonthDay,t.endMonthDate))},on:{click:function(n){t.selectFirstItem(e,a)}}});var r}))})],2):t._e(),t._v(" "),t.isCompact?t._e():n("div",{staticClass:"calendar_month_right"},[n("div",{staticClass:"months-text"},[t._v("\n "+t._s(t.monthsLocale[t.startNextActiveMonth]+" "+t.activeYearEnd)+"\n "),n("i",{staticClass:"right",on:{click:t.goNextMonth}})]),t._v(" "),n("ul",{class:t.s.daysWeeks},t._l(t.shortDaysLocale,function(e){return n("li",{key:e},[t._v(t._s(e))])})),t._v(" "),t._l(6,function(e){return n("ul",{key:e,class:[t.s.days]},t._l(t.numOfDays,function(a){return n("li",{key:a,class:[(r={},r[t.s.daysSelected]=t.isDateSelected(e,a,"second",t.startNextMonthDay,t.endNextMonthDate),r[t.s.daysInRange]=t.isDateInRange(e,a,"second",t.startNextMonthDay,t.endNextMonthDate),r[t.s.dateDisabled]=t.isDateDisabled(e,a,t.startNextMonthDay,t.endNextMonthDate),r)],domProps:{innerHTML:t._s(t.getDayCell(e,a,t.startNextMonthDay,t.endNextMonthDate))},on:{click:function(n){t.selectSecondItem(e,a)}}});var r}))})],2)]),t._v(" "),t.showMonth&&t.isCompact?t._e():n("div",{staticClass:"calendar-range",class:{"calendar-range-mobile ":t.isCompact}},[n("ul",{staticClass:"calendar_preset"},[t._l(t.finalPresetRanges,function(e,a){return n("li",{key:a,staticClass:"calendar_preset-ranges",class:{"active-preset":t.presetActive===e.label},on:{click:function(n){t.updatePreset(e)}}},[t._v("\n "+t._s(e.label)+"\n ")])}),t._v(" "),n("li",[n("button",{staticClass:"calendar-btn-apply",on:{click:function(e){t.setDateValue()}}},[t._v(t._s(t.captions.ok_button))])])],2)])]):t._e()])},r=[];a._withStripped=!0;var i={render:a,staticRenderFns:r};e.a=i},function(t,e,n){var a=n(41);"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);n(45)("0e3b102e",a,!1,{})},function(t,e,n){t.exports={default:n(14),__esModule:!0}},function(t,e,n){n(40),t.exports=n(5).Object.assign},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var a=n(4);t.exports=function(t){if(!a(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var a=n(9),r=n(36),i=n(35);t.exports=function(t){return function(e,n,o){var s,c=a(e),u=r(c.length),l=i(o,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var a=n(15);t.exports=function(t,e,n){if(a(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,a){return t.call(e,n,a)};case 3:return function(n,a,r){return t.call(e,n,a,r)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var a=n(4),r=n(3).document,i=a(r)&&a(r.createElement);t.exports=function(t){return i?r.createElement(t):{}}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var a=n(3),r=n(5),i=n(19),o=n(24),s=function(t,e,n){var c,u,l,d=t&s.F,f=t&s.G,h=t&s.S,g=t&s.P,p=t&s.B,v=t&s.W,M=f?r:r[e]||(r[e]={}),m=M.prototype,y=f?a:h?a[e]:(a[e]||{}).prototype;f&&(n=e);for(c in n)(u=!d&&y&&void 0!==y[c])&&c in M||(l=u?y[c]:n[c],M[c]=f&&"function"!=typeof y[c]?n[c]:p&&u?i(l,a):v&&y[c]==l?function(t){var e=function(e,n,a){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,a)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):g&&"function"==typeof l?i(Function.call,l):l,g&&((M.virtual||(M.virtual={}))[c]=l,t&s.R&&m&&!m[c]&&o(m,c,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var a=n(27),r=n(32);t.exports=n(1)?function(t,e,n){return a.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){t.exports=!n(1)&&!n(2)(function(){return 7!=Object.defineProperty(n(20)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var a=n(30),r=n(28),i=n(31),o=n(37),s=n(7),c=Object.assign;t.exports=!c||n(2)(function(){var t={},e={},n=Symbol(),a="abcdefghijklmnopqrst";return t[n]=7,a.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=a})?function(t,e){for(var n=o(t),c=arguments.length,u=1,l=r.f,d=i.f;c>u;)for(var f,h=s(arguments[u++]),g=l?a(h).concat(l(h)):a(h),p=g.length,v=0;p>v;)d.call(h,f=g[v++])&&(n[f]=h[f]);return n}:c},function(t,e,n){var a=n(16),r=n(25),i=n(38),o=Object.defineProperty;e.f=n(1)?Object.defineProperty:function(t,e,n){if(a(t),e=i(e,!0),a(n),r)try{return o(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var a=n(23),r=n(9),i=n(17)(!1),o=n(33)("IE_PROTO");t.exports=function(t,e){var n,s=r(t),c=0,u=[];for(n in s)n!=o&&a(s,n)&&u.push(n);for(;e.length>c;)a(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},function(t,e,n){var a=n(29),r=n(21);t.exports=Object.keys||function(t){return a(t,r)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var a=n(34)("keys"),r=n(39);t.exports=function(t){return a[t]||(a[t]=r(t))}},function(t,e,n){var a=n(3),r=a["__core-js_shared__"]||(a["__core-js_shared__"]={});t.exports=function(t){return r[t]||(r[t]={})}},function(t,e,n){var a=n(8),r=Math.max,i=Math.min;t.exports=function(t,e){return t=a(t),t<0?r(t+e,0):i(t,e)}},function(t,e,n){var a=n(8),r=Math.min;t.exports=function(t){return t>0?r(a(t),9007199254740991):0}},function(t,e,n){var a=n(6);t.exports=function(t){return Object(a(t))}},function(t,e,n){var a=n(4);t.exports=function(t,e){if(!a(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!a(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!a(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!a(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){var n=0,a=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+a).toString(36))}},function(t,e,n){var a=n(22);a(a.S+a.F,"Object",{assign:n(26)})},function(t,e,n){e=t.exports=n(42)(!1),e.push([t.i,'\n.input-date[data-v-5e837f70] {\n display: block;\n border: 1px solid #ccc;\n padding: 5px;\n font-size: 14px;\n width: 230px;\n cursor: pointer;\n}\n.input-date[data-v-5e837f70]::after {\n content: "\\25BC";\n float: right;\n font-size: smaller;\n}\n.active-preset[data-v-5e837f70] {\n border: 1px solid #0096d9;\n color: #0096d9;\n border-radius: 3px;\n}\n.months-text[data-v-5e837f70] {\n text-align: center;\n font-weight: bold;\n}\n.months-text .left[data-v-5e837f70] {\n float: left;\n cursor: pointer;\n width: 16px;\n height: 16px;\n background-image: url("data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMS4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDMxLjQ5NCAzMS40OTQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMxLjQ5NCAzMS40OTQ7IiB4bWw6c3BhY2U9InByZXNlcnZlIiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4Ij4KPHBhdGggZD0iTTEwLjI3Myw1LjAwOWMwLjQ0NC0wLjQ0NCwxLjE0My0wLjQ0NCwxLjU4NywwYzAuNDI5LDAuNDI5LDAuNDI5LDEuMTQzLDAsMS41NzFsLTguMDQ3LDguMDQ3aDI2LjU1NCAgYzAuNjE5LDAsMS4xMjcsMC40OTIsMS4xMjcsMS4xMTFjMCwwLjYxOS0wLjUwOCwxLjEyNy0xLjEyNywxLjEyN0gzLjgxM2w4LjA0Nyw4LjAzMmMwLjQyOSwwLjQ0NCwwLjQyOSwxLjE1OSwwLDEuNTg3ICBjLTAuNDQ0LDAuNDQ0LTEuMTQzLDAuNDQ0LTEuNTg3LDBsLTkuOTUyLTkuOTUyYy0wLjQyOS0wLjQyOS0wLjQyOS0xLjE0MywwLTEuNTcxTDEwLjI3Myw1LjAwOXoiIGZpbGw9IiMwMDZERjAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==");\n}\n.months-text .right[data-v-5e837f70] {\n float: right;\n cursor: pointer;\n width: 16px;\n height: 16px;\n background-image: url("data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMS4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDMxLjQ5IDMxLjQ5IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMS40OSAzMS40OTsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNMjEuMjA1LDUuMDA3Yy0wLjQyOS0wLjQ0NC0xLjE0My0wLjQ0NC0xLjU4NywwYy0wLjQyOSwwLjQyOS0wLjQyOSwxLjE0MywwLDEuNTcxbDguMDQ3LDguMDQ3SDEuMTExICBDMC40OTIsMTQuNjI2LDAsMTUuMTE4LDAsMTUuNzM3YzAsMC42MTksMC40OTIsMS4xMjcsMS4xMTEsMS4xMjdoMjYuNTU0bC04LjA0Nyw4LjAzMmMtMC40MjksMC40NDQtMC40MjksMS4xNTksMCwxLjU4NyAgYzAuNDQ0LDAuNDQ0LDEuMTU5LDAuNDQ0LDEuNTg3LDBsOS45NTItOS45NTJjMC40NDQtMC40MjksMC40NDQtMS4xNDMsMC0xLjU3MUwyMS4yMDUsNS4wMDd6IiBmaWxsPSIjMDA2REYwIi8+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=");\n}\n.calendar-root[data-v-5e837f70],\n.calendar-title[data-v-5e837f70] {\n font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n}\n.calendar-right-to-left[data-v-5e837f70] {\n margin-left: -460px;\n}\n.calendar[data-v-5e837f70] {\n display: block;\n font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n width: 700px;\n font-size: 12px;\n height: 300px;\n box-shadow: -3px 4px 12px -1px #ccc;\n background: #fff;\n position: absolute;\n z-index: 9;\n}\n.calendar-head h2[data-v-5e837f70] {\n padding: 20px 0 0 20px;\n margin: 0;\n}\n.close[data-v-5e837f70]:hover {\n cursor: pointer;\n}\n.close[data-v-5e837f70]{\n float: right;\n padding: 0 10px;\n margin-top: -35px;\n font-size: 32px;\n font-weight: normal;\n}\n.calendar ul[data-v-5e837f70] {\n list-style-type: none;\n}\n.calendar-wrap[data-v-5e837f70] {\n display: inline-block;\n float: left;\n width: 75%;\n padding: 10px;\n}\n.calendar-range[data-v-5e837f70] {\n float: left;\n padding: 0 12px;\n border-left: 1px solid #ccc;\n margin: -2px;\n}\n.calendar-left-mobile[data-v-5e837f70] {\n width: 100% !important;\n}\n.calendar_month_left[data-v-5e837f70],\n.calendar_month_right[data-v-5e837f70] {\n float: left;\n width: 43%;\n padding: 10px;\n margin: 5px;\n}\n.calendar_weeks[data-v-5e837f70] {\n margin: 0;\n padding: 10px 0;\n width: auto;\n}\n.calendar_weeks li[data-v-5e837f70] {\n display: inline-block;\n width: 13.6%;\n color: #999;\n text-align: center;\n}\n.calendar_days[data-v-5e837f70] {\n margin: 0;\n padding: 0;\n}\n.calendar_days li[data-v-5e837f70] {\n display: inline-block;\n width: 13.6%;\n color: #333;\n text-align: center;\n cursor: pointer;\n line-height: 2em;\n}\n.calendar_preset li[data-v-5e837f70] {\n line-height: 2.6em;\n width: auto;\n display: block;\n}\n.calendar_days li[data-v-5e837f70]:hover {\n background: #eee;\n color: #000;\n}\nli.calendar_days--disabled[data-v-5e837f70]{\n pointer-events: none;\n}\nli.calendar_days_selected[data-v-5e837f70] {\n background: #005a82;\n color: #fff;\n}\nli.calendar_days_in-range[data-v-5e837f70] {\n background: #0096d9;\n color: #fff;\n}\n.calendar_preset[data-v-5e837f70] {\n padding: 0;\n}\n.calendar_preset li.calendar_preset-ranges[data-v-5e837f70] {\n padding: 0 30px 0 10px;\n margin-bottom: 5px;\n cursor: pointer;\n margin-top: 1px;\n}\n.calendar_preset li.calendar_preset-ranges[data-v-5e837f70]:hover {\n background: #eee;\n}\n.calendar-mobile[data-v-5e837f70] {\n width: 260px;\n z-index: 1;\n box-shadow: none;\n}\n.calendar-range-mobile[data-v-5e837f70] {\n width: 90%;\n padding: 2px;\n border-left: none;\n margin: -20px 0;\n}\n.calendar-btn-apply[data-v-5e837f70] {\n width: 100%;\n background: #f7931e;\n color: #fff;\n border: none;\n padding: 5px;\n font-size: 14px;\n}\n',""])},function(t,e){function n(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=a(r);return[n].concat(r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"})).concat([i]).join("\n")}return[n].join("\n")}function a(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var a=n(e,t);return e[2]?"@media "+e[2]+"{"+a+"}":a}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var a={},r=0;r3?0:(t-t%10!=10)*t%10]}};var D={D:function(t){return t.getDate()},DD:function(t){return s(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return t.getDay()},dd:function(t){return s(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return t.getMonth()+1},MM:function(t){return s(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return String(t.getFullYear()).substr(2)},YYYY:function(t){return t.getFullYear()},h:function(t){return t.getHours()%12||12},hh:function(t){return s(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return s(t.getHours())},m:function(t){return t.getMinutes()},mm:function(t){return s(t.getMinutes())},s:function(t){return t.getSeconds()},ss:function(t){return s(t.getSeconds())},S:function(t){return Math.round(t.getMilliseconds()/100)},SS:function(t){return s(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return s(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+s(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)}},x={D:[l,function(t,e){t.day=e}],Do:[new RegExp(l.source+h.source),function(t,e){t.day=parseInt(e,10)}],M:[l,function(t,e){t.month=e-1}],YY:[l,function(t,e){var n=new Date,a=+(""+n.getFullYear()).substr(0,2);t.year=""+(e>68?a-1:a)+e}],h:[l,function(t,e){t.hour=e}],m:[l,function(t,e){t.minute=e}],s:[l,function(t,e){t.second=e}],YYYY:[f,function(t,e){t.year=e}],S:[/\d/,function(t,e){t.millisecond=100*e}],SS:[/\d{2}/,function(t,e){t.millisecond=10*e}],SSS:[d,function(t,e){t.millisecond=e}],d:[l,p],ddd:[h,p],MMM:[h,o("monthNamesShort")],MMMM:[h,o("monthNames")],a:[h,function(t,e,n){var a=e.toLowerCase();a===n.amPm[0]?t.isPm=!1:a===n.amPm[1]&&(t.isPm=!0)}],ZZ:[/([\+\-]\d\d:?\d\d|Z)/,function(t,e){"Z"===e&&(e="+00:00");var n,a=(e+"").match(/([\+\-]|\d\d)/gi);a&&(n=60*a[1]+parseInt(a[2],10),t.timezoneOffset="+"===a[0]?n:-n)}]};x.dd=x.d,x.dddd=x.ddd,x.DD=x.D,x.mm=x.m,x.hh=x.H=x.HH=x.h,x.MM=x.M,x.ss=x.s,x.A=x.a,c.masks={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},c.format=function(t,e,n){var a=n||c.i18n;if("number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date in fecha.format");e=c.masks[e]||e||c.masks.default;var r=[];return e=e.replace(g,function(t,e){return r.push(e),"??"}),e=e.replace(u,function(e){return e in D?D[e](t,a):e.slice(1,e.length-1)}),e.replace(/\?\?/g,function(){return r.shift()})},c.parse=function(t,e,n){var a=n||c.i18n;if("string"!=typeof e)throw new Error("Invalid format in fecha.parse");if(e=c.masks[e]||e,t.length>1e3)return!1;var r=!0,i={};if(e.replace(u,function(e){if(x[e]){var n=x[e],o=t.search(n[0]);~o?t.replace(n[0],function(e){return n[1](i,e,a),t=t.substr(o+e.length),e}):r=!1}return x[e]?"":e.slice(1,e.length-1)}),!r)return!1;var o=new Date;!0===i.isPm&&null!=i.hour&&12!=+i.hour?i.hour=+i.hour+12:!1===i.isPm&&12==+i.hour&&(i.hour=0);var s;return null!=i.timezoneOffset?(i.minute=+(i.minute||0)-+i.timezoneOffset,s=new Date(Date.UTC(i.year||o.getFullYear(),i.month||0,i.day||1,i.hour||0,i.minute||0,i.second||0,i.millisecond||0))):s=new Date(i.year||o.getFullYear(),i.month||0,i.day||1,i.hour||0,i.minute||0,i.second||0,i.millisecond||0),s},void 0!==t&&t.exports?t.exports=c:void 0!==(a=function(){return c}.call(e,n,e,t))&&(t.exports=a)}()},function(t,e,n){"use strict";function a(t){o||n(12)}Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(11),o=!1,s=n(10),c=a,u=s(r.a,i.a,!1,c,"data-v-5e837f70",null);u.options.__file="src/RangedatePicker.vue",e.default=u.exports},function(t,e,n){function a(t){for(var e=0;en.parts.length&&(a.parts.length=n.parts.length)}else{for(var o=[],r=0;r