Skip to content

Multiple collumns and  #159

Open
Open

Description

@pelikanek

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.

Activity

  1. pelikanek commented on Apr 23, 2015

    @pelikanek
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions