Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Date Picker: Invalid range issues

$
0
0
Be sure your post includes:

1. SmartClient Version: v9.1p_2014-07-20/Pro Deployment (built 2014-07-20)

2. FireFox v31.0, Chrome Version 36.0.1985.125 m

3. sample code

I have listgrid as follows

Code:

isc.ListGrid.create({
            dataSource: "showcase_ListInfo",
            autoFetchData: true,
            showFilterEditor: true
        })

For the datasource

Code:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<DataSource ID="showcase_ListInfo"
            titleField="displayedName"
            clientOnly="true"
            dataFormat="json"
            dataURL="/<project_name_goes_here>/ds/test_data/showcase_ListInfo.data.json"
    >
    <fields>
        <field name="dateTime" width="150" type="datetime" title="Date Time"/>
        <field name="number" type="integer" title="Number">
            <validators>
                <validator errorMessage="Invalid Numeric Value" type="isInteger"/>
            </validators>
        </field>
    </fields>
</DataSource>

Here is the small snippet for showcase_ListInfo.data.json -
Code:

[
  {"dateTime":"2009-04-24T06:07:20-04:00",
        "number":10}
{"dateTime":"2009-05-24T06:07:20-04:00",
        "number":10}
{"dateTime":"2009-05-24T06:07:20-04:00",
        "number":12}
{"dateTime":"2009-04-24T06:07:15-04:00",
        "number":10}
{"dateTime":"2009-04-24T06:07:16-04:00",
        "number":12}
{"dateTime":"2009-06-24T06:07:20-04:00",
        "number":10}
{"dateTime":"2009-04-24T06:07:20-04:00",
        "number":10}
{"dateTime":"2009-05-24T06:07:20-04:00",
        "number":10}
{"dateTime":"2009-05-24T06:07:20-04:00",
        "number":12}
{"dateTime":"2009-04-24T06:07:15-04:00",
        "number":10}
{"dateTime":"2009-04-24T06:07:20-04:00",
        "number":10}
{"dateTime":"2009-05-24T06:07:20-04:00",
        "number":10}
{"dateTime":"2009-05-24T06:07:20-04:00",
        "number":12}
]

Now there are 2 issues here -

FIRST -
1. Open the date range dialog
2. In the "To:" field add date earlier than "From:" field
3. Click Ok - As expected the error "To Field value cannot be earlier than From field value" error is shown.
4. Close the dialog and open it again to find the error bubble still persisting.

SECOND -
Perform all the steps from 1-3.
4. Now change the millisecond in "To" field some value like "999" and hit Ok.
5. Notice that the value in the "To" field is change to some random time.

Can you tell me if I am going wrong some where?

- Thanks

Viewing all articles
Browse latest Browse all 4756

Trending Articles