XForms/Date Range Search

Motivation

edit

You want to limit search results based on one or more dates within items.

Method

edit

We will create a XForms application that will have two calendar selectors. We can use the built-in calendar selector or allow users to select the year, month, day values separately.

Month Code Table

edit
<code-table>
    <code-table-name>date-month-code</code-table-name>
    <description>A list of all the month codes for doing searchs.</description>
    <items>
        <item>
            <label>January</label>
            <numeric-id>1</numeric-id>
            <abbreviation>Jan</abbreviation>
            <value>january</value>
        </item>
        <item>
            <label>February</label>
            <numeric-id>2</numeric-id>
            <abbreviation>Feb</abbreviation>
            <value>february</value>
        </item>
        <item>
            <label>March</label>
            <numeric-id>3</numeric-id>
            <abbreviation>Mar</abbreviation>
            <value>march</value>
        </item>
        <item>
            <label>April</label>
            <numeric-id>4</numeric-id>
            <abbreviation>Apr</abbreviation>
            <value>april</value>
        </item>
        <item>
            <label>May</label>
            <numeric-id>5</numeric-id>
            <abbreviation>May</abbreviation>
            <value>may</value>
        </item>
        <item>
            <label>June</label>
            <numeric-id>6</numeric-id>
            <abbreviation>Jun</abbreviation>
            <value>june</value>
        </item>
        <item>
            <label>July</label>
            <numeric-id>7</numeric-id>
            <abbreviation>Jul</abbreviation>
            <value>july</value>
        </item>
        <item>
            <label>August</label>
            <numeric-id>8</numeric-id>
            <abbreviation>Aug</abbreviation>
            <value>august</value>
        </item>
        <item>
            <label>September</label>
            <numeric-id>9</numeric-id>
            <abbreviation>Sep</abbreviation>
            <value>september</value>
        </item>
        <item>
            <label>October</label>
            <numeric-id>10</numeric-id>
            <abbreviation>Oct</abbreviation>
            <value>october</value>
        </item>
        <item>
            <label>November</label>
            <numeric-id>11</numeric-id>
            <abbreviation>Nov</abbreviation>
            <value>november</value>
        </item>
        <item>
            <label>December</label>
            <numeric-id>12</numeric-id>
            <abbreviation>Dec</abbreviation>
            <value>december</value>
        </item>
    </items>
</code-table>