Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple collumns and #159

Open
pelikanek opened this issue Mar 10, 2015 · 1 comment
Open

Multiple collumns and #159

pelikanek opened this issue Mar 10, 2015 · 1 comment

Comments

@pelikanek
Copy link

Hello, use your date-picker with multicollumn option (I show 3 months). By default, there are previous month, this month and next month (-1,0,1). But I need show this month, next month and month after it (0,+1,+2). Is it possible? Thank you for answer.

@pelikanek
Copy link
Author

I hacked file Picker.Date.js, try to change iterateDate and it works, look at this:

renderDays: function(date, fx){
    var options = this.options, months = options.columns, _columns = [], _dates = [],
            iterateDate = date.clone().decrement('month', Math.floor((months-1) / 2));
        this.dateElements = [];
    //-- hack pelikanek,  ----------------------------------------------
    if(months == 3) {
      iterateDate = date.clone().decrement('month', 0);
    }
    else  {
      iterateDate = date.clone().decrement('month', Math.floor((months-1) / 2));
    }

//----------------------------------- hack pelikanek,-------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant