ICEfaces
  1. ICEfaces
  2. ICE-10573

Regression ace:dateTimeEntry date is reset to Jan 1970 after submitting time change

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-4.0.0.GA
    • Fix Version/s: EE-4.0.0.GA
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      ICEfaces 4 trunk r44258. Tomcat 7, IE 11, FF 34, Chrome 41. showcase ace:dateTimeEntry > Time Entry demo
    • Assignee Priority:
      P1
    • Affects:
      Sample App./Tutorial

      Description

      Using showcase ace:dateTimeEntry > Time Entry demo causes date to reset from current date to Jan 1970.
      To reproduce:
      1.) Load demo, notice that the date rendered on the calendar header is the current date.
      2.) Select the Time only radio button
      3.) Change the time and submit.
      4.) Use either the Time and Date or Date Only radio buttons.
      5.) Notice that the date has been reset to January 1970.

        Activity

        Liana Munroe created issue -
        Liana Munroe made changes -
        Field Original Value New Value
        Summary Regression ace:dateTimeEntry date is reset to Jan 1970 sfter submitting time change Regression ace:dateTimeEntry date is reset to Jan 1970 after submitting time change
        Ken Fyten made changes -
        Assignee Judy Guglielmin [ judy.guglielmin ]
        Fix Version/s EE-4.0.0.GA [ 11171 ]
        Affects Sample App./Tutorial [ 10001 ]
        Assignee Priority P1 [ 10010 ]
        Judy Guglielmin made changes -
        Assignee Judy Guglielmin [ judy.guglielmin ] Arturo Zambrano [ artzambrano ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44309 Wed Mar 25 16:21:14 MDT 2015 art.zambrano ICE-10573 app-level fix to preserve date parameters and time parameters when the component is is time-only and date-only mode, respectively
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/date/datetimeentry.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/date/DateTimeBean.java
        Hide
        Arturo Zambrano added a comment -

        r44309: committed app-level fix to preserve date parameters and time parameters when the component is is time-only and date-only mode, respectively.

        The issue had to be fixed at the application level. The component is just working the way it's supposed to work and there's no feasible way to make it preserve a date when switching to time-only mode or to preserve the time when switching to date-only mode. The component uses three different widgets in the client side (timepicker, datepicker, and datetimepicker) and each of them interprets and returns the value of the component in a different way way. The component will read the value in the pattern given, and will set the value in the same pattern. In time-only mode the date format is not included in the pattern, since the date is irrelevant, it is set to the default value (Jan 1, 1970). Likewise, in date-only mode, the time format is not included in the pattern, and it is set to the default value (00:00:00, adjusted for locale). In this specific case, the calendar switches between the 3 modes for demonstration purposes, but it's impossible to make assumptions in the component code about what date or time to set if they weren't explicitly given by the client side. Therefore, a custom fix in the demo itself was the most appropriate solution.

        Show
        Arturo Zambrano added a comment - r44309: committed app-level fix to preserve date parameters and time parameters when the component is is time-only and date-only mode, respectively. The issue had to be fixed at the application level. The component is just working the way it's supposed to work and there's no feasible way to make it preserve a date when switching to time-only mode or to preserve the time when switching to date-only mode. The component uses three different widgets in the client side (timepicker, datepicker, and datetimepicker) and each of them interprets and returns the value of the component in a different way way. The component will read the value in the pattern given, and will set the value in the same pattern. In time-only mode the date format is not included in the pattern, since the date is irrelevant, it is set to the default value (Jan 1, 1970). Likewise, in date-only mode, the time format is not included in the pattern, and it is set to the default value (00:00:00, adjusted for locale). In this specific case, the calendar switches between the 3 modes for demonstration purposes, but it's impossible to make assumptions in the component code about what date or time to set if they weren't explicitly given by the client side. Therefore, a custom fix in the demo itself was the most appropriate solution.
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Liana Munroe added a comment -

        Verified ICEfaces EE-4.0.0 Jenkins build 2. Tomcat 7, IE 11. FF 34, Chrome 41.

        Show
        Liana Munroe added a comment - Verified ICEfaces EE-4.0.0 Jenkins build 2. Tomcat 7, IE 11. FF 34, Chrome 41.
        Ken Fyten made changes -
        Security Private [ 10001 ]
        Hide
        Liana Munroe added a comment -

        Tested with ICEfaces EE-4.0.0 Jenkins build 4. Tomcat 7, all browsers.
        New issue in dateTimeEntry > Time Entry demo
        When using the Date Only calendar, picking a date then submitting, the date chosen is not updated on the page. Instead the next day's date is rendered instead.
        Example:
        Today's date is April 1. Using Date Only demo I choose April 16 and press submit. The Selected Date and Time on the page is updated to April 2.

        Show
        Liana Munroe added a comment - Tested with ICEfaces EE-4.0.0 Jenkins build 4. Tomcat 7, all browsers. New issue in dateTimeEntry > Time Entry demo When using the Date Only calendar, picking a date then submitting, the date chosen is not updated on the page. Instead the next day's date is rendered instead. Example: Today's date is April 1. Using Date Only demo I choose April 16 and press submit. The Selected Date and Time on the page is updated to April 2.
        Liana Munroe made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44372 Wed Apr 01 11:40:43 MDT 2015 art.zambrano ICE-10573 fix to take the new date when adjusting the selected date
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/date/DateTimeBean.java
        Hide
        Arturo Zambrano added a comment -

        Committed fix to take the new date when adjusting the selected date, to the 4.0 trunk at revision 44372 and to the 4.0 EE tag at revision 44373.

        Show
        Arturo Zambrano added a comment - Committed fix to take the new date when adjusting the selected date, to the 4.0 trunk at revision 44372 and to the 4.0 EE tag at revision 44373.
        Arturo Zambrano made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Carmen Cristurean added a comment -

        Testing with Jenkins EE-4.0.GA Build 5:

        showcase > dateTimeEntry > TimeEntry (all browsers):
        When using only the "Date Only" calendar, submitting a new date renders the next day on the page.

        As example, clicking on April 15 in the calendar renders on page:
        Selected Date and Time: April 16, 2015

        Show
        Carmen Cristurean added a comment - Testing with Jenkins EE-4.0.GA Build 5: showcase > dateTimeEntry > TimeEntry (all browsers): When using only the "Date Only" calendar, submitting a new date renders the next day on the page. As example, clicking on April 15 in the calendar renders on page: Selected Date and Time: April 16, 2015
        Carmen Cristurean made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44382 Wed Apr 01 15:33:10 MDT 2015 art.zambrano ICE-10573 removed date adjustment after setting the time parameters
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/date/DateTimeBean.java
        Hide
        Arturo Zambrano added a comment -

        r44382, r44383: removed date adjustment after setting the time parameters.

        On my computer, it was necessary to adjust the date, after setting the time parameters. Try now to see if it works right for you.

        Show
        Arturo Zambrano added a comment - r44382, r44383: removed date adjustment after setting the time parameters. On my computer, it was necessary to adjust the date, after setting the time parameters. Try now to see if it works right for you.
        Arturo Zambrano made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Liana Munroe added a comment -

        Verified ICEfaces EE-4.0.0 r44383. Tomcat 7, FF 34, Chrome 41, IE 11.

        Show
        Liana Munroe added a comment - Verified ICEfaces EE-4.0.0 r44383. Tomcat 7, FF 34, Chrome 41, IE 11.
        Hide
        Liana Munroe added a comment -

        Verified ICEfaces EE-4.0.0 Jenkins build 6. Tomcat 7. FF 34, Chrome 41, IE 11.

        Show
        Liana Munroe added a comment - Verified ICEfaces EE-4.0.0 Jenkins build 6. Tomcat 7. FF 34, Chrome 41, IE 11.
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Liana Munroe
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: