ICEfaces
  1. ICEfaces
  2. ICE-3544

ice:selectInputDate: add optional time input fields to calendar component

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.1
    • Fix Version/s: 1.8RC1, 1.8
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      any
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial

      Description

      Add time input fields to the calendar component.

        Activity

        Hide
        Adnan Durrani added a comment -

        Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\CSS_DEFAULT.java
        Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDate.java
        Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java
        Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\rime\rime-portlet.css
        Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\rime\rime.css
        Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\royale\royale.css
        Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\xp\xp-portlet.css
        Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\xp\xp.css
        Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDate.java
        Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\xp\xp.css
        Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\CSS_DEFAULT.java
        Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\rime\rime-portlet.css
        Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java
        Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\xp\xp-portlet.css
        Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\royale\royale.css
        Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\rime\rime.css
        Completed: At revision: 18182

        Show
        Adnan Durrani added a comment - Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\CSS_DEFAULT.java Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDate.java Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\rime\rime-portlet.css Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\rime\rime.css Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\royale\royale.css Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\xp\xp-portlet.css Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\xp\xp.css Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDate.java Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\xp\xp.css Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\CSS_DEFAULT.java Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\rime\rime-portlet.css Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\xp\xp-portlet.css Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\royale\royale.css Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\core\src\com\icesoft\faces\resources\css\rime\rime.css Completed: At revision: 18182
        Hide
        Adnan Durrani added a comment -

        DateTime demo integrated to selectInputDate under component-showcase.

        Show
        Adnan Durrani added a comment - DateTime demo integrated to selectInputDate under component-showcase.
        Hide
        Ken Fyten added a comment -

        Some notes after reviewing the Comp. Showcase changes.

        1. When entering times using the selectOneMenu seems to work fairly well, on Firefox at least you can type ahead to select a specific time instead of using the mouse, this is likely browser-specific behavior.

        2. There seems to be a problem with the popup time entry in that you can select a new time by picking items in the selectOneMenus, but the new time isn't updated in the inputText (or component value) unless you pick a date after you enter the time. This seems like a bug. To be consistent with the date selection the time should update as each element is selected immediately (hours, then minutes, then AM/PM) as we don't have a confirmation button on the popup, if you select a value, it changes immediately.

        Show
        Ken Fyten added a comment - Some notes after reviewing the Comp. Showcase changes. 1. When entering times using the selectOneMenu seems to work fairly well, on Firefox at least you can type ahead to select a specific time instead of using the mouse, this is likely browser-specific behavior. 2. There seems to be a problem with the popup time entry in that you can select a new time by picking items in the selectOneMenus, but the new time isn't updated in the inputText (or component value) unless you pick a date after you enter the time. This seems like a bug. To be consistent with the date selection the time should update as each element is selected immediately (hours, then minutes, then AM/PM) as we don't have a confirmation button on the popup, if you select a value, it changes immediately.
        Hide
        Ken Fyten added a comment -

        Also, the Description page for this component (in showcase) needs to be edited to add the new time entry features.

        Show
        Ken Fyten added a comment - Also, the Description page for this component (in showcase) needs to be edited to add the new time entry features.
        Hide
        Adnan Durrani added a comment -

        Changes made so the time can be changed as soon as time updated.

        Docs added to Tld and component-showcase.

        Trunk: revision 18200

        Show
        Adnan Durrani added a comment - Changes made so the time can be changed as soon as time updated. Docs added to Tld and component-showcase. Trunk: revision 18200
        Hide
        Krashan Brahmanjara added a comment - - edited

        Current version selectInputDate has got few problems

        • if user enter date by hand and click button calendar date and view is not always initizalized properly
        • if user select date on calendar window it stay visible, previous was closed
        • are converter extension in src code was neccesary? I use converters before and everything working ok
        • first look ...it is slower that previous
        • for invalid date on Tab key framework generates correct Faces validation message rendered on client view,
          but onClick a moment later gives general error screen ...

        java.text.ParseException: Unparseable date: "AAA2009-01-14"
        at java.text.DateFormat.parse(DateFormat.java:337)
        at javax.faces.convert.DateTimeConverter.getAsObject(DateTimeConverter.java:398)
        at com.icesoft.faces.component.selectinputdate.SelectInputDateRenderer.getConvertedValue(SelectInputDateRenderer.java:1689)
        at javax.faces.component.UIInput.getConvertedValue(UIInput.java:942)
        at com.icesoft.faces.component.selectinputdate.SelectInputDate.getConvertedValue(SelectInputDate.java:1100)
        at com.icesoft.faces.component.selectinputdate.SelectInputDate.validate(SelectInputDate.java:1172)

        By now I think that Calendar version, before January, was better.

        Show
        Krashan Brahmanjara added a comment - - edited Current version selectInputDate has got few problems if user enter date by hand and click button calendar date and view is not always initizalized properly if user select date on calendar window it stay visible, previous was closed are converter extension in src code was neccesary? I use converters before and everything working ok first look ...it is slower that previous for invalid date on Tab key framework generates correct Faces validation message rendered on client view, but onClick a moment later gives general error screen ... java.text.ParseException: Unparseable date: "AAA2009-01-14" at java.text.DateFormat.parse(DateFormat.java:337) at javax.faces.convert.DateTimeConverter.getAsObject(DateTimeConverter.java:398) at com.icesoft.faces.component.selectinputdate.SelectInputDateRenderer.getConvertedValue(SelectInputDateRenderer.java:1689) at javax.faces.component.UIInput.getConvertedValue(UIInput.java:942) at com.icesoft.faces.component.selectinputdate.SelectInputDate.getConvertedValue(SelectInputDate.java:1100) at com.icesoft.faces.component.selectinputdate.SelectInputDate.validate(SelectInputDate.java:1172) By now I think that Calendar version, before January, was better.
        Hide
        Adnan Durrani added a comment -

        Hi Krashan Brahmanjara,

        Thanks for reporting the bug. The conversion error has been fixed.

        Thanks,

        Show
        Adnan Durrani added a comment - Hi Krashan Brahmanjara, Thanks for reporting the bug. The conversion error has been fixed. Thanks,
        Hide
        Ken Fyten added a comment -

        There is a bug where if you use the keyboard tab key to navigate to a date on the calendar (via-tab key) and press enter, it closes the popup as you'd expect, but selects the previously selected date instead of the one you just pressed enter on. This doesn't happen on the non-popup calendar, just the popup one.

        It should selected the date that enter was pressed on and close the calendar. I think it might be related to the focus being put on the close button when they popup the calendar.

        Show
        Ken Fyten added a comment - There is a bug where if you use the keyboard tab key to navigate to a date on the calendar (via-tab key) and press enter, it closes the popup as you'd expect, but selects the previously selected date instead of the one you just pressed enter on. This doesn't happen on the non-popup calendar, just the popup one. It should selected the date that enter was pressed on and close the calendar. I think it might be related to the focus being put on the close button when they popup the calendar.
        Hide
        Adnan Durrani added a comment -

        The bug mentioned in Ken's last comment can not be reproduced. Removing the focus changing behaviour might fixed it.

        Show
        Adnan Durrani added a comment - The bug mentioned in Ken's last comment can not be reproduced. Removing the focus changing behaviour might fixed it.
        Hide
        Joanne Bai added a comment -

        Test environment: Tomcat 6 + ICEfaces-1.8.0-RC1 build.2
        Tested for IE6, FF2, and Opera9.27 and three versions of Component Showcase

        • now the calendar popup won't close itself at the time a date is selected. It will close if user click a spot outside of the calendar popup, or the close button. Once the popup is closed, output date text can get updated.
        • user can type in date and time. When finish typing, click on the calendar button will bring up the popup that reflects the currently entered date/time
        • On the calendar popup, selecting a new time alone without picking a date will update the input date field

        Ken mentioned the issue of "use the keyboard tab key to navigate to a date on the calendar (via-tab key) and press enter". It seems to be browser specific. It can be reproduced on FF2, but tested successfully on IE6. On Opera, the tab key does not work - It does not tab through the dates on calendar.

        The behaviors described above are identical to all three versions of Component Showcase

        Show
        Joanne Bai added a comment - Test environment: Tomcat 6 + ICEfaces-1.8.0-RC1 build.2 Tested for IE6, FF2, and Opera9.27 and three versions of Component Showcase now the calendar popup won't close itself at the time a date is selected. It will close if user click a spot outside of the calendar popup, or the close button. Once the popup is closed, output date text can get updated. user can type in date and time. When finish typing, click on the calendar button will bring up the popup that reflects the currently entered date/time On the calendar popup, selecting a new time alone without picking a date will update the input date field Ken mentioned the issue of "use the keyboard tab key to navigate to a date on the calendar (via-tab key) and press enter". It seems to be browser specific. It can be reproduced on FF2, but tested successfully on IE6. On Opera, the tab key does not work - It does not tab through the dates on calendar. The behaviors described above are identical to all three versions of Component Showcase
        Hide
        Krashan Brahmanjara added a comment -

        I still see regresion. User cannot select date on calendar window and close that window by click. Calendar is still visible, previous was closed on click.

        The error is in SelectInputRenderer.java lines 1725-1735 (rev19393) unnecesary commented in revision 18213 by Adnan.Durrani !

        I see also :

        • duplicated code lines 1137-1141 and 1145-1149
        • unoptimal assignement - lines 1088-1104 should be executed before line 1077
        Show
        Krashan Brahmanjara added a comment - I still see regresion. User cannot select date on calendar window and close that window by click. Calendar is still visible, previous was closed on click. The error is in SelectInputRenderer.java lines 1725-1735 (rev19393) unnecesary commented in revision 18213 by Adnan.Durrani ! I see also : duplicated code lines 1137-1141 and 1145-1149 unoptimal assignement - lines 1088-1104 should be executed before line 1077
        Hide
        Adnan Durrani added a comment -

        Krashan Brahmanjara the popup calendar doesn't close on click is an intentional change its not a bug.

        Show
        Adnan Durrani added a comment - Krashan Brahmanjara the popup calendar doesn't close on click is an intentional change its not a bug.
        Hide
        Krashan Brahmanjara added a comment -

        OK Adnan. But my users and probably others may not accept this new behaviour

        • closing window on click worked well before , no problems occured, now app users see it as a bug or regression
        • almost all calendar implementation from js, jsp,jsf up to c++ ... do the same - user select date and calendar disappear.

        My vote - restore lines 1725-1735 or old behaviour.

        Show
        Krashan Brahmanjara added a comment - OK Adnan. But my users and probably others may not accept this new behaviour closing window on click worked well before , no problems occured, now app users see it as a bug or regression almost all calendar implementation from js, jsp,jsf up to c++ ... do the same - user select date and calendar disappear. My vote - restore lines 1725-1735 or old behaviour.
        Hide
        Krashan Brahmanjara added a comment -

        After some test I see that in current source from rev. 18425 only 1664-1670 lines should be uncommented to keep old behaviour.

        > if (showPopup != null) {
        > if (showPopup.equalsIgnoreCase("true"))

        { > dateSelect.setShowPopup(true); > }

        else

        { > dateSelect.setShowPopup(false); > }

        > }

        Rows 1710-1720 can be commented .

        Show
        Krashan Brahmanjara added a comment - After some test I see that in current source from rev. 18425 only 1664-1670 lines should be uncommented to keep old behaviour. > if (showPopup != null) { > if (showPopup.equalsIgnoreCase("true")) { > dateSelect.setShowPopup(true); > } else { > dateSelect.setShowPopup(false); > } > } Rows 1710-1720 can be commented .
        Hide
        Adnan Durrani added a comment -

        Changes made so:

        1. The popup will be closed automatically on selecting a date when there isn't any time input elements on the calendar (same as 1.7.2 behaviour)
        2. The popup will NOT be closed automatically on selecting a date, if there are time fields on the popup

        Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java
        Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java
        Completed: At revision: 18458

        Show
        Adnan Durrani added a comment - Changes made so: 1. The popup will be closed automatically on selecting a date when there isn't any time input elements on the calendar (same as 1.7.2 behaviour) 2. The popup will NOT be closed automatically on selecting a date, if there are time fields on the popup Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java Completed: At revision: 18458
        Hide
        Mandeep Hayher added a comment -

        Following behaviour have been successfully verified on ICEFaces1.8 buil6 (Tomcat5 server, FF3, IE7 & Opera9.63 browsers)

        1. The popup will be closed automatically on selecting a date when there isn't any time input elements on the calendar (same as 1.7.2 behaviour)
        2. The popup will NOT be closed automatically on selecting a date, if there are time fields on the popup

        Show
        Mandeep Hayher added a comment - Following behaviour have been successfully verified on ICEFaces1.8 buil6 (Tomcat5 server, FF3, IE7 & Opera9.63 browsers) 1. The popup will be closed automatically on selecting a date when there isn't any time input elements on the calendar (same as 1.7.2 behaviour) 2. The popup will NOT be closed automatically on selecting a date, if there are time fields on the popup

          People

          • Assignee:
            Unassigned
            Reporter:
            Michael Thiem
          • Votes:
            6 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: