No announcement yet.

Grid & Search by date, only partially matching?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Grid & Search by date, only partially matching?

    I have a grid & search application, where I start with the search module and iframe in the grid results.

    I have a date field where I want the user to select the month and date and click search to display all records on that date. However, even when set the date field to be required, it does not prevent a user from submitting just the 'month' and searching.

    For example, lets say I want to display all records from March 15. (Let's ignore the year for now). If the user types in 03/15 (mm/dd) or using the calendar selector, it works fine. However, a user could just type in '03' (for March), and pull all records from March. In addition, I could just put in "15" for the day, and all records with a day of 15, regardless of the month, will return. I have tried using a combo box and calendar widget, but they both suffer the same fate. I have disallowed 'empty searches' as well.

    How do I make the month, and date fields required so you can't just submit the month? Later on, I'd like to make the month, date, and year required -- but thought I'd start with an easy one.

    Thanks in advance.

  • #2
    There are situations where you would be able to have some kind of event in the search section to influence the search result. I have been trying, but simply could not find a good solution for that. So I made a separate form to select from and worked from there. Not a great thing to do, but it works.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development /