Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Smart Client Datetime issue

    SmartClient Version: 8.1/Enterprise Development Only (built 2011-08-02)
    Browser TimeZone : IST
    Server TimeZone : PDT
    Browser : Firefox 3.6.22

    In search dialog box, whenever search date and select today from the drop down, below request sent to Server

    {timezoneOffset=330, _constructor=AdvancedCriteria, operator=and, criteria=[{fieldName=workOrderDate, operator=equals, value=Mon Sep 26 11:30:00 PDT 2011}], userAction=search}


    Whenever select date by date control (27-Sep-2011 01:00 ), below request sent to server:

    {timezoneOffset=330, _constructor=AdvancedCriteria, operator=and, criteria=[{fieldName=workOrderDate, operator=equals, value=Tue Sep 27 00:00:00 PDT 2011}], userAction=search}


    Below is the field definition:

    <field>
    <name>workOrderDate</name>
    <type>datetime</type>
    <wrap>true</wrap>
    <title>Work Order Date</title>
    <prompt>Work Order Date</prompt>
    <filterEditorProperties operator ="iContains"/>
    </field>

    Question: There is a difference in the datetime send to the server if user choose Today vs the current date ? What we need to do make this behavior consistent. For user, today vs selecting the today date is same, but the request provides two different value which gives user the wrong results.

    #2
    iContains operates on Strings, it doesn't make sense to apply this to a "datetime" field. Consider a DateRangeItem instead.

    Comment


      #3
      Thanks Isomorphic!!!

      I have removed <filterEditorProperties operator ="iContains"/> and still getting the same values.


      Please suggest!!!

      Comment


        #4
        Again, consider a DateRangeItem. This should be the default, and when the user selects "today", appropriate criteria are generated. It looks like you have added extra code of some kind which may be causing this problem. If you disagree, please show a minimal, standalone test case showing that there is a framework problem here.

        Comment

        Working...
        X