Rendering of dates to include options & buttons

Rendering of dates to include options & buttons

FireNet999FireNet999 Posts: 11Questions: 3Answers: 0

I am trying to use SearchBuilder to do some date searches
I have the following in fields and it comes through as expected

    {
        label: 'Date of Birth:',
        name: 'users.dob',
            type: 'datetime',
            displayFormat: 'DD/MM/YYYY',
            wireFormat: 'DD-MM-YYYY',
            opts: {
                minDate: new Date('01-01-1940'),
            buttons: {
                today: true,
                clear: true
                     }            
            }
    },

However, when I do a search on a date that I have rendered as follows, it gives me the date picker but only the default settings ie minDate is 2000 and no today or clear button.

      {
        data: 'users.dob', 
        render: DataTable.render.datetime('DD MM YYYY')
         },

I have tried a number of different rendering formats but can't find an example of how to pull in the options and buttons.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 64,278Questions: 1Answers: 10,611 Site admin
    Answer ✓

    I think that is a bug in SearchBuilder at the moment I'm afraid. I need to look into that.

    Allan

  • FireNet999FireNet999 Posts: 11Questions: 3Answers: 0

    Many thanks, Allan
    Colin

Sign In or Register to comment.