Date Picker in Toolbar to Append Value to Search

Date Picker in Toolbar to Append Value to Search

zgoforthzgoforth Posts: 493Questions: 98Answers: 2
edited May 2021 in DataTables 1.10

Link to test case: https://jsfiddle.net/BeerusDev/9yqLfz07/25/ (sorry it is such a long case, but its my actual application and it works). The lines where I implemented the Date picker are at 300-304 & 183

Hello,

I am having trouble getting the Date Picker to properly work. I have created the toolbar and inserted the Date Picker in it. I cannot get it to append values to the search bar, or even better is it possible to remove the search bar overall "I know it is possible manipulating the dom" but having the date picker instead?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    Yep, you can use dom, and add your own elements, see example here.

    Colin

  • zgoforthzgoforth Posts: 493Questions: 98Answers: 2

    Fixed it and now it searches the table perfectly! One thing that I have issues with is the placement of the items in the dom, the items do not place where I expect them to go. With

    dom: '<"toolbar">Brt',
    

    Both items place on the left, I can use CSS to have the toolbar property float right, but if I want the toolbar on the left, and the button on the right, how can I manipulate the dom to have the button collection place on the right?

    dom: '<"toolbar">rtB',
    

    This places the button collection below the table which I would think would place it on the right?

    Here is my test case: https://jsfiddle.net/BeerusDev/9yqLfz07/39/

  • zgoforthzgoforth Posts: 493Questions: 98Answers: 2

    Disregard...

    '<"toolbar"><"right"B>rt',
    
This discussion has been closed.