How to add text field to just left side of searching field.

How to add text field to just left side of searching field.

arvindg82arvindg82 Posts: 16Questions: 4Answers: 0

How to add text field to just left side of searching field with date calender?

Replies

  • kthorngrenkthorngren Posts: 21,450Questions: 26Answers: 4,975

    See if this example does what you want.

    Kevin

  • arvindg82arvindg82 Posts: 16Questions: 4Answers: 0

    How to add calendar to right of textbox?

  • allanallan Posts: 63,691Questions: 1Answers: 10,500 Site admin

    There isn't a built in option for that. What Kevin was getting at is that you would need to add the calendar input yourself. Insert the input element using the DOM control (as show in the example) and then initialise the calendar control you are using on it. You'd need to tie that calendar control in with the DataTables search as well.

    So it is possible, not perhaps non-trivial.

    Allan

  • kthorngrenkthorngren Posts: 21,450Questions: 26Answers: 4,975

    Probably the easiest way to add it to the right of the search input is to use something like jQuery append(), for example:
    https://live.datatables.net/cidocihe/1/edit

    Use the browser's inspect tool to see the ``tag idassigned to the-tag div` wrapper for the search input.

    If you want a range search see this example and possibly use this date search plugin.

    Kevin

  • arvindg82arvindg82 Posts: 16Questions: 4Answers: 0

    I Need to filtering data using date range with calendar of two textbox before global search.

  • kthorngrenkthorngren Posts: 21,450Questions: 26Answers: 4,975

    Sounds like the date range search plugin I linked to is what you need. If you want the inputs before the search input then use jQuery prepend() to prefix the two inputs.

    Kevin

Sign In or Register to comment.