Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 195473 - Date / Time Picker for entering report parameter of type date, time, datetime
Summary: Date / Time Picker for entering report parameter of type date, time, datetime
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.2.0   Edit
Hardware: PC Windows XP
: P3 enhancement with 19 votes (vote)
Target Milestone: Future   Edit
Assignee: Zhiqiang Qian CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 209134 223007 (view as bug list)
Depends on: 124726
Blocks:
  Show dependency tree
 
Reported: 2007-07-05 02:55 EDT by Martin Ahrer CLA
Modified: 2013-03-12 13:36 EDT (History)
19 users (show)

See Also:


Attachments
contains files needed to integrate a calendar widget into parameter pages (238.65 KB, application/x-zip-compressed)
2010-06-25 13:11 EDT, Nick Padilla CLA
no flags Details
Correct File to Use (113.57 KB, application/x-zip-compressed)
2010-06-25 13:16 EDT, Nick Padilla CLA
no flags Details
source files to extend BIRT with a JQ datepicker (minimal selection) (128.05 KB, application/x-zip-compressed)
2011-02-11 09:02 EST, Benny Meyns CLA
no flags Details
fixed source files to extend BIRT with a JQ datepicker (minimal selection) (128.07 KB, patch)
2011-05-04 09:58 EDT, Benny Meyns CLA
no flags Details | Diff
fixed source files to extend BIRT with a JQ datepicker (minimal selection, v.2) (128.14 KB, application/octet-stream)
2012-02-06 10:35 EST, Benny Meyns CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Ahrer CLA 2007-07-05 02:55:28 EDT
For an end users convenience an option for alternatively using a picker component to choose a date (or time) is required. The picker could work like a combo box:
* the user is able to directly enter a date/time in a date field
* the user has the option to click a button (associated with the date field), this displays a calendar (or time) box to choose from.

The picker component must be fully localizable in order to support proper display of date/time in a users locale.
Comment 1 Penelope Constanta CLA 2007-07-18 17:58:20 EDT
All my reports depend on start-end date parameter setting and being able to use a date picker will help. 

I am also interested in being able to set the default parameter value of the start and end dates in a dynamic way: e.g. 
  StartDate=today-7days 
  EndDate=today

Thank you
Comment 2 Jerry Cheng CLA 2008-03-17 21:37:28 EDT
*** Bug 223007 has been marked as a duplicate of this bug. ***
Comment 3 Wenfeng Li CLA 2008-06-12 23:12:09 EDT
Schedule for 2.5.0 and set the helpwanted keyword.  
Comment 4 Scott Rosenbaum CLA 2008-07-21 10:37:14 EDT
*** Bug 209134 has been marked as a duplicate of this bug. ***
Comment 5 Zhiqiang Qian CLA 2008-11-06 01:38:37 EST
Is there any possibility that we evaluate and have IP review for the YUI calendar control (http://developer.yahoo.com/yui/calendar/)? Seems it's very promising.
Comment 6 Wenfeng Li CLA 2008-11-06 02:55:18 EST
I will check if YUI is already approved in the orbit project.
Comment 7 Andy Lewis CLA 2009-03-12 12:06:03 EDT
My company and I are very interested in getting this enhancement. Is there a definitive ETA on when this calendar widget will be implemented in BIRT?
Comment 8 Wenfeng Li CLA 2009-03-12 13:49:44 EDT
(In reply to comment #7)
> My company and I are very interested in getting this enhancement. Is there a
> definitive ETA on when this calendar widget will be implemented in BIRT?

There is no ETA for this enahancement yet.  Is there a possbility for your company to help contribute to this feature?
Comment 9 Justin Molnar CLA 2009-07-08 02:16:40 EDT
My company and I are interested in this enhancement. Is there an ETA on this at all? The ability to have a calendar type of object to select dates on a reports parameters would be fantastic. 

You mentioned that a contribution may be needed to help push this enhancement along, how much would we be looking at?
Comment 10 Wenfeng Li CLA 2009-08-17 10:38:17 EDT
(In reply to comment #9)
> My company and I are interested in this enhancement. Is there an ETA on this at
> all? The ability to have a calendar type of object to select dates on a reports
> parameters would be fantastic. 
> You mentioned that a contribution may be needed to help push this enhancement
> along, how much would we be looking at?

Sorry for not being clear.   I was referring to code contribution.  If you are interested in purcharing service or product that already has this feature.  Please check out http://www.birt-exchange.com.
Comment 11 cekali CLA 2010-03-29 09:03:45 EDT
Any update on this? A datepicker was implemented in the expression builder (bugzilla 124726). Last comment appeared several months ago, just wondering if this has died or if a solution has been found but not implemented. Any information would be appreciated
Comment 12 Régis Ramillien CLA 2010-06-21 08:44:03 EDT
Hello,

The enhancement was targeted for 2.5.
Can you give us any information on the advancement, please ?
Comment 13 Wenfeng Li CLA 2010-06-21 13:49:36 EDT
(In reply to comment #11)
> Any update on this? A datepicker was implemented in the expression builder
> (bugzilla 124726). Last comment appeared several months ago, just wondering if
> this has died or if a solution has been found but not implemented. Any
> information would be appreciated

The datapicker in expression builder is in the Eclipse IDE, the datepicker for the web viewer can not use it since it is a web application.

Are you deploying BIRT as a desktop application or as a web application?
Comment 14 Régis Ramillien CLA 2010-06-21 16:21:43 EDT
For my company, we use BIRT viewer as a web-app, but we also need the date picker in the parameter window of the BIRT designer when previewing the report.
Comment 15 Wenfeng Li CLA 2010-06-21 17:27:01 EDT
please attach your code to this bug if you can make the enhancement to the web viewer.  We will incorporate it into the source tree after testing and code review.
Comment 16 Nick Padilla CLA 2010-06-25 13:00:46 EDT
I was able to get this integrated using a jquery widget.  This is a bit hardcoded and could be setup to take specific id's to create the widget on. Here are the steps i have taken:

1. Added jquery stuff to BIRT under birt/customjs/jquery for the calendar widget and its css/images, but can be called anything of course.  
2. Added cal.gif to the birt/images directory for the calender widget.
3. Added jquery scripts/css imports to FramesetFragment.jsp, then added this line to the top of the first javascript tag 'jQuery = jQuery.noConflict();' This will allow us to use any jquery library now by importing the using the jQuery syntax instead of the '$'.
4. Added ID attribute to the HiddenParameterFragment.jsp and TextBoxParameterFramgment.jsp page, so we can use it with the jquery cal widget. The hidden input change is so you can specify a hidden text field as an secondary text field to populate.  The benefit is so you can have a secondary format for display, or make it easiery to combine with non date fields.  The best thing in my mind is to pass back to the Java backend a Date object so you don't have to parse anything.
5. Inside the jquery/styles/custom.css you will need to either us the original or when you overwrite it you need to add a z-index: 203; so that the cal will display on top of the parameter fragment.  This is of course if you download a jquery library and not use the one provided.
6. All you need to do now is create a parameter group, DateGroup.  Add a Date data type in a Text box display type.  Set a format of Short Date, call this parameter start_date; create a second field called end_date. Add this group to a report and run it, you should now see a pretty calendar widget to set your date fields.  

Let me know what you think, Thanks!
Comment 17 Nick Padilla CLA 2010-06-25 13:11:16 EDT
Created attachment 172786 [details]
contains files needed to integrate a calendar widget into parameter pages

Sorry forgot to add this step, haha the most important one too:

Add the jQuery widget javascript to the very bottom of the <div> in ParameterDialogFragment.jsp. The calendar will get added on jQuery(document).ready(); You can find the specific code in the zip i have uploaded.
Comment 18 Nick Padilla CLA 2010-06-25 13:16:10 EDT
Created attachment 172789 [details]
Correct File to Use

Sorry please use this zip file instead as it contains everything.
Comment 19 Wenfeng Li CLA 2010-06-25 14:12:16 EDT
Note to Zhiqiang,  please submit a IP review request to Eclipse emo to use jquery in BIRT project.
Comment 20 Zhiqiang Qian CLA 2010-06-27 22:55:07 EDT
I've tried the attached patch with described instructions and it works well. I further tried with the latest jQuery 1.4.2+ui-1.82, but seems not working. I will file an IP review request for jQuery 1.3.2+ui-1.7.2 first.
Comment 22 abhishanth123 CLA 2010-11-03 02:20:33 EDT
Can any one please give a step by step process on how to add this widget to the eclipse BIRT source code.

Thank you
Comment 23 abhishanth123 CLA 2010-11-03 02:46:15 EDT
Can any one please give a step by step process on how to add this widget to the eclipse BIRT source code.

Thank you
Comment 24 Benny Meyns CLA 2011-02-11 09:02:48 EST
Created attachment 188775 [details]
source files to extend BIRT with a JQ datepicker (minimal selection)

Optimized the files committed by Nick.
override the default BIRT-viewer files with the one in the attached "birt_jq-datepicker_customization.zip"-file

Remarks:
    * valid for BIRT-viewer v. 2.6.1
    * default configured for Dutch (to be parameterized)
    * Had to use JQuery 1.3.2 + JQuery UI 1.7.3 (JQ 1.5 + JQ UI 1.8.9 conflicts with PrototypeJS 1.4 used by BIRT)
Comment 25 John J Feigal CLA 2011-03-02 12:25:42 EST
Is there an estimated release date for Target Milestone 3.7.0?  To the best of my knowledge, the current version of BIRT (and the BIRT Viewer) is 2.6.2. If 3.7.0 is relative to the current numbering scheme, a date picker in the BIRT Viewer would still not be available any time soon.
Comment 26 Wenfeng Li CLA 2011-03-02 12:41:50 EST
(In reply to comment #25)
> Is there an estimated release date for Target Milestone 3.7.0?  To the best of
> my knowledge, the current version of BIRT (and the BIRT Viewer) is 2.6.2. If
> 3.7.0 is relative to the current numbering scheme, a date picker in the BIRT
> Viewer would still not be available any time soon.

Release date for 3.7 is end of June 2011, along with the Indigo Eclipse release.

However, we need to pass the IP review of JQuery by the Eclipse foundation to include this patch in BIRT download.

In the meantime, you can incroporate the patch attached to this bugzilla in your application if you can use Jquery in your app.
Comment 27 Benny Meyns CLA 2011-05-04 09:58:16 EDT
Created attachment 194715 [details]
fixed source files to extend BIRT with a JQ datepicker (minimal selection)

fixed bug when normal TextBoxFragment, added extra check in "TextBoxParameterFragment.jsp":
if (parameterDateFormatJQ!=null) {
Comment 28 Zhiqiang Qian CLA 2011-05-17 21:59:00 EDT
Still need wait for IP review result of jQuery UI library.
Comment 29 Benny Meyns CLA 2012-02-06 10:35:15 EST
Created attachment 210596 [details]
fixed source files to extend BIRT with a JQ datepicker (minimal selection, v.2)

finetuned Datepicker (allows now the use the <enter>-key on datefields to submit the form)
Comment 30 Benny Meyns CLA 2012-02-06 10:37:51 EST
(In reply to comment #29)
also added a year-selector (+/- 2 yrs)
Comment 31 Mark Proe CLA 2013-03-12 13:36:30 EDT
This patch works great.  But I require a newer version of jQuery UI.  Has anybody found a way to get this work with 1.8.x or greater?