Coder Social home page Coder Social logo

damienroche / vue-mj-daterangepicker Goto Github PK

View Code? Open in Web Editor NEW
60.0 60.0 39.0 1.84 MB

๐Ÿ—“Vue.js date range picker with multiples ranges and presets (vue 2.x)

Home Page: https://damienroche.github.io/vue-mj-daterangepicker/

JavaScript 21.76% HTML 1.49% Vue 75.43% TypeScript 1.06% CSS 0.27%
date-picker datepicker daterangepicker vue2 vuejs

vue-mj-daterangepicker's Introduction

Hi there ๐Ÿ‘‹

vue-mj-daterangepicker's People

Contributors

damienroche avatar devsaider avatar lamaeats avatar piccard21 avatar tusaeff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vue-mj-daterangepicker's Issues

Month Range

Is this library support to select the month range?

Present sets!

The ability to select a date range not from today but from an arbitrary date of 3 months? or year? it would be nice to present

Namespace for element classes

Hello, it's very common now a days to use webpack to filter-out unused classes from css files. Adding a namespace so that all styles related to this component, specially since the DOM isn't present on html files which is what webpack looks over. having a consistent namespace for classes would make it very easy to whistlist classes

The date-range-picker does not even show-up.

First of all thanks to the wonderful plugin. The design looks very neat and superb.

The picker does not even show up in the component I have used.
I have used the same code as described in the example.
There are no errors in the console though.

<date-range-picker begin="2016-02-19T00:00:00.000+01:00" :from="from" :to="to" :panel="panel" :theme="theme"/>

<script>

export default {
  name: "SampleComponent",
  data: () => ({
    to: '2019-04-23T10:26:00.996Z',
    from: '2018-04-23T10:26:00.996Z',
    panel: 'range',
    theme: {
      primary: '#46C3A3',
      secondary: '#2D3E50',
      ternary: '#93A0BD',
      light: '#ffffff',
      border: '#e6e6e6',
      dark: '#000000',
      hovers: {
        day: '#CCC',
        range: '#e6e6e6'
      }
    }
  }),
  methods: {
    update(values) {
      this.$router.push({
        query: Object.assign({}, this.$route.query, {
          to: values.to,
          from: values.from,
          panel: values.panel
        })
      });
    }
  }
};

</script>

The initialisation is done in the application.js

import Vue from "vue";
import DateRangePicker from 'vue-mj-daterangepicker'
import 'vue-mj-daterangepicker/dist/vue-mj-daterangepicker.css'

Vue.use(DateRangePicker)

Show the range from begin month

Hi, Damien!
You made a great date range picker!
I have a question about start and finish range date begin.

What's the point?
Today is 09 March. I set the date range from 15 March to 05 April and save it.
Then I refresh the page, after page is loaded I see that current month setted as April (because the end range is next month and i do not see March), it would be better if calendar could begin from Start range - March!

What I see when page is loaded: (End of the range)
image

What i expected to see: (Start of the range)
image

I try to use begin param with a start date, but it does not help.

<date-range-picker 
    ref="rangepicker"
    :begin="'{{ $item->start }}'"
    :from="'{{ $item->start }}'" 
    :to="'{{ $item->finish }}'" 
    :past="false" 
/>

Btw, it would be useful to add a Home icon (or a method to quickly back to the current day, but without it selected)

other locales

Is possible to add other locales like 'es'?

Thanks

presets buttons only work on first DateRangePicker in v-for loop

<div v-for="(Device,key) in Devices" :key="key">
<date-range-picker :ref="Device.Id"  @update="update" :theme="dateRangeTheme"  :from="Device.startDate" :to="Device.endDate" :presets='presets' :panels="['range', 'week', 'month']"/>
</div>

Only the first iteration of the date-range-picker component allows me to change the presets. The others don't respond when I click the input button. Although the Submit and Reset ranges buttons work still. I'm not receiving any errors in my console.

$attrs is readonly error

I have used the same code as described in the example. (in laravel-vue working project). After istalation i saw this errors in browser console:[Vue warn]: $attrs is readonly and [Vue warn]: $attrs is readonly and [Vue warn]: $listeners is readonly.
Before this error wasnt exists((( Is this problem from datepicker or this depends on some special config of my app? Thanks

the 'currentPanel' is not updated when updating the 'panel' prop

By default i want month and week panel to be available but when you click a certain button i have written code to update the 'panel' prop. But the calander is not updated and when i look what is stored in the 'currentPanel' data variable it is still month and week. Is it possible to update this?

[Enhancement] Is it possible click on month or year

Is it possible that if user open week panel and if he wants to change the year or month of opened calendar then on click on month it will open month panel from which they can select month and the functionality of selecting week for that panel remain same.

Year panel selection with future false breaks

Year panel selection with future false causes browser to toss the long script warning. even if I set the yearsCount to 0. It should simply not show the future years but the right count of years in the past.

How to add a new language?

I'd like to add a new language, but I currently have no clue on how to do that.

Can I add a language without having to change the source code?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.