Calendar popup in WAD - Urgent

In web application designer - I need to incorporte date function which should have a calendar popup.  I need to select date from the calendar.
This is happening in bex - query level, but when use the same query in WAD , it is not showing the popup.
Give me your valuble suggestion to incorporate in our real time scenario.
regards,
Giri

hi kiran,
thx for your spontaneous reply,
reg. my scenario i already enabled the force variable option, but still i am not getting a calenar like popup.
for example, the user wants to enter your date of birth, u will be displayed with the calendar month popup, u can select the date from the popup.
kindly forward your suggestion, i will asssign points if its useful
regards
giri

Similar Messages

  • Calendar popup for a date field in ITS service

    Hi
    I am working with SRM EBP module we want to add date help(with calendar function) to existing date fields in Shopping cart and PO screens . I found some HTML and scripts in SYSTEM and BBPGLOBAL(assuming in regular ITS this service might be GLOBAL) services but not sure which ones to use if anyone used date functionality or even have access to Standard SAP ITS screens that already have date field with calendar functionality can you help???????????????
    Scenario what we are trying to do
    1) On the shopping cart details there is a require on field
    2) we are trying to add a f4 icon(which we did successfully)
    3) when a click happens on the icon a calendar popup should appear(for this we are trying to identify what standard SAP function we can use if not i got a JavaScript on the web trying to see how to integrate that script)
    Thanks in Advance

    Hi
    I browsed thru other services i found PZLE_06 and there is a date field with popup but difference between ESS and SRM is ESS i saw uses webgui concept and SRM has different approach if you can point me to the html template in one of the service where the calendar function is called that will be helpful i tried no luck i got the funciton issue is integrating it with existing code in HTML i mean calling the javascript from HTML i am not able to .
    Thank You
    Vineela

  • Calendar popup is not working properly in af:inputDate

    HI,
    I am using af:inputDate component as,
    <af:inputDate label="Input Date :"/>
    The popup calendar is not working properly in my case. When I click on calendar buttong of the component, it is opening the calendar popup properly with showing proper date.
    Now in this popup I am able to change month or year only once. Means if I am watching January month initialy and now I changed it to May, it reflect the month properly. But before closing the dialog, if I again change the month to some another month, it is not changing the calendar at all. The same case is with year also.
    One more thing i want you to notice is, this component is working properly on a sample page where there is nothing in that page. But when I am adding it in my application with the same tag, it is not working.
    Can any one tell me where I should look for the fix?
    Sujay

    Sujay,
    It's always frustrating when someone says "it is giving me exception" without providing the details. It's akin to going to your automobile mechanic and saying, "a warning light comes on." Wouldn't you think it pertinent to tell the mechanic which warning light came on? If yes, then why wouldn't you provide the exception (and perhaps the pertinent part of the stack trace) here?
    Furthermore, since it works in a "very simple page," the component does at least work part of the time. If your car started at least part of the time, you'd tell your mechanic what you did that causes it not to start (for example, when I leave the headlamps on all night, it doesn't start the following morning). So... what is special about your page that it doesn't work?
    Best,
    John

  • Help in Calendar popup please

    Hi
    i have a problem in calendar popup that is iam putting the calendar inside a Group Panel at the bottom of page and when i click on popup the page will be taller so please do any one know how to make popup visible above calendar component i tried to modify the theme by editing Calendar.js file but iam having an error in sun i can't run any page any more i need to reinstall IDE may be iam not putting the defaulteheme.jar in correct folder
    any one help please
    HEN

    Hi
    i have a problem in calendar popup that is iam
    putting the calendar inside a Group Panel at the
    bottom of page and when i click on popup the page
    will be taller so please do any one know how to make
    popup visible above calendar component i tried to
    modify the theme by editing Calendar.js file but iam
    having an error in sun i can't run any page any more
    i need to reinstall IDE may be iam not putting the
    defaulteheme.jar in correct folder
    any one help please I'm not quite sure what you're asking for but I have a prototype sample calendar that might work better. See http://blogs.sun.com/roller/page/edwingo?entry=component_authoring_for_creator.
    -Edwin
    Creator team
    http://blogs.sun.com/edwingo/

  • Af:inputDate not refreshing Calendar popup

    HI,
    I am facing one strange problem with af:inputDate component. When you click on calendar icon of this field it opens the Calendar popup to choose the date. Now it is allowing changing the date only one time. It allows me only to change year/month once. Now suppose it is displaying "January" month at the start, if i change the month to "May", it refreshes the calendar. But after that if i change year/month, it doesnt refresh the calendar.
    I think there is some problem with some scripts.
    Did any one come across such problem?
    - Sujay.

    Do you have your inputDate in a toolbar? I have almost the same problem when I try to use inputDate in a toolbar (in a dvt:schedulingGantt component if that matters), but not if I place it elsewhere on the page. The difference is that for me the calendar is never updated when I change anything. It seems to me that there is something wrong with the javascript part of it. I can pick any month from the drop-down, but only one month right/left with the arrows. In either case nothing happens in the calendar.
    This seems like a bug to me.
    Anyway, if you haven't solved this yet, try putting the inputDate somewhere else and see if that helps.

  • Display Hijri Calendar in Calendar Popup

    Hi All,
    We have a requirement of showing Hijri Calendar instead of Gregorian Calendar in the Calendar popup. we have a custom calendar.
    We would like to know the javascript function fired on click of calendar icon.
    For example in OA Framework the function
    "function _ldp{}" in Common2_2_24_1.js is fired. Similary is there any method in ADF.
    So that i can display the hijri date to the user.
    I am using JDeveloper 10.1.3.3, ADF, EJB3.0 and Toplink.
    Thanks & Regards
    Vimalan Balan

    Hi Frank,
    The below is the generated code from the html. There i found out the method which we click on the image icon of select input date.
    onclick="_ldp('eGovPO','eGovPO:poRequestedDateH');
    The javascript file in the generated html is /EGovPortal/adf/jsLibs/Common10_1_3_3_0.js but i am not able to locate this file in the JDeveloper.
    Since, i want to call my custom application from the standard function _ldp(). Otherwise i have to create calendar icon for each textfield to invoke my hijiri calendar.
    But i don't want to do this.
    <table id="eGovPO:poRequestedDateH__xc_" cellpadding="0" cellspacing="0" border="0" summary=""><tr><td class="xx" nowrap width="37%"><span class="xc"><span title="&#1605;&#1591;&#1604;&#1608;&#1576;" class="xi">*</span> <label for="eGovPO:poRequestedDateH">PO Date</label></span></td><td width="12"><script>t(12)</script></td><td valign="top" nowrap width="63%"><script>var _locale='ar';var _tLocale='ar';</script><script src="/EGovPortal/adf/jsLibs/resources/LocaleElements_ar10_1_3_3_0.js;jsessionid=c0a801d423218ce20d54d4c144c38f2e9e0117db66d5"></script><script>var _df2DYS=1950;</script><input id="eGovPO:poRequestedDateH" name="eGovPO:poRequestedDateH" onblur="_dfb(this)" class="x8" size="10" type="text"><script>t(8,1)</script><script>var _jspDir='/EGovPortal/faces/__ADFv__?_afPfm=1';</script><script>var _uixLocaleTZ=180;</script><a href="#" onclick="_ldp('eGovPO','eGovPO:poRequestedDateH'); return false"><img src="/EGovPortal/adf/images/oracle/dprtl.gif;jsessionid=c0a801d423218ce20d54d4c144c38f2e9e0117db66d5" width="19" height="24" border="0" alt="&#1581;&#1583;&#1583; &#1607;&#1584;&#1575; &#1575;&#1604;&#1582;&#1610;&#1575;&#1585; &#1604;&#1604;&#1608;&#1589;&#1608;&#1604; &#1573;&#1604;&#1609; &#1605;&#1606;&#1578;&#1602;&#1610; &#1575;&#1604;&#1578;&#1575;&#1585;&#1610;&#1582;" align="middle"></a></td></tr></table>
    Thanks & Regards
    Vimalan Balan

  • Refresh of report hides jQuery calendar popup anchors

    In an attempt to build an interactive tabular form in Oracle Apex 4.0.2.00.07, we have based an interactive report on a query containing:
    SELECT ...
         , apex_item.date_popup2( p_idx              => 11
                                , p_value            => to_char(..., 'DD.MM.YYYY')
                                , p_date_format      => 'DD.MM.YYYY'
                                , p_size             => 12
                                , p_maxlength        => 10
                                , p_attributes       => 'onchange="..."'
                                , p_item_id          => 'f11_' || to_char(deincno)      -- deincno = primary key column
                                , p_show_on          => 'both'
    FROM   ...This renders perfectly. However, any interactive change in the report (filtering, sorting, hiding/showing columns, ...) will hide the calendar popup anchors, reducing the field to a normal text box. Only when the page is reloaded do the calendar popup anchors reappear.
    Any help or advice on how to prevent these anchors from dissapearing would be greatly appreciated.

    You need to rebuild the date pickers after the apexafterrefresh jquery event
    If you look at your page source > scroll to the bottom and you will see some jquery code that builds date-pickers initially on the page load
    (function(){apex.widget.datepicker("#f11_7369", { buttonImage: "/i/asfdcldr.gif", buttonImageOnly: true,"buttonText":"Calendar","showTime":false,"defaultDate":new Date(1980,11,17),"showOn":"button","showOtherMonths":false,"changeMonth":false,"changeYear":false}, "dd.mm.yy", "en-gb");})();You can look into your above code and find some of the contextual/dynamic parameters into the date-picker widget such as date format,image path etc...
    You can use those values to add this code accordingly
    Add this to your page header javascript
    apex.jQuery('#apexir_WORKSHEET_REGION').bind("apexafterrefresh", function () {
         // loop through the actual f11 column
         jQuery.each($('input[name="f11"]'), function () {
              //rebuild the datepickers
              var vid = "#" + $(this).attr('id');
              (function () {
                   apex.widget.datepicker(vid, {
                        buttonImage : "/i/asfdcldr.gif",
                        buttonImageOnly : true,
                        "buttonText" : "Calendar",
                        "showTime" : false,
                        "showOn" : "button",
                        "showOtherMonths" : false,
                        "changeMonth" : false,
                        "changeYear" : false
                   }, "dd.mm.yy", "en-gb");
    OR create a dynamic action with event after refresh and with action execute javascript
    // loop through the actual f11 column
    jQuery.each($('input[name="f11"]'), function () {
              //rebuild the datepickers
              var vid = "#" + $(this).attr('id');
              (function () {
                   apex.widget.datepicker(vid, {
                        buttonImage : "/i/asfdcldr.gif",
                        buttonImageOnly : true,
                        "buttonText" : "Calendar",
                        "showTime" : false,
                        "showOn" : "button",
                        "showOtherMonths" : false,
                        "changeMonth" : false,
                        "changeYear" : false
                   }, "dd.mm.yy", "en-gb");
    });Edited by: VC on Jun 19, 2012 11:01 AM

  • JavaScript Calendar Popup 2.0 with Netscape 6.2

    The JavaScript Calendar Popup 2.0 doesn't work with netscape 6.2. Once u press any button on the popup, it goes in infinite loop. Anybody knows solution to that.

    Sundeep: both MM-to-CCM and CCM-to-MM integration is standard as of ECC 6.0.
    Check the following documentation (talks more about MM-to-CCM, but there's some info on Catalog-to-MM):
    <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/46/b596e138a941ce9fba8fc8533674ee/frameset.htm">Integration of Web-Based Catalogs in Purchasing</a>
    Cheers,
    Serguei

  • Problem with af:selectInputDate (no calendar popup)

    Hi All,
    I have a problem with the af:selectInputDate component and the calendar popup when using a custom converter. My converter converts the date in a way, that it always has a four digit year depending on the short date format and the corresponding locale, e.g. 01/18/2007 instead of 01/18/07 for en-us. It looks like when I am using my converter with the component in the following way some javascript is not generated by the af:selectInputDate which results in an javascript error when clicking on the popup button:
    <h:panelGroup>
    <af:selectInputDate id="idPatientBirthDate" columns="12" simple="true" value="#{PatientDetails.patient.birthDate}">
    <f:converter converterId="BirthdateConverter" />
    </af:selectInputDate>
    <h:message for="idPatientBirthDate" errorClass="errorMessageStyle"></h:message>     
    </h:panelGroup>
    The following javascript is not generated using the above jsf:
    <script>
    if(window['_dfs'] == (void 0)){var _dfs=new Object();}_dfs["_id43:general:idPatientBirthDate"]='M/d/yyyy';function __id43Validator(){return true;}
    </script>
    I am using version 10.1.3.0.4 of ADF faces.
    My BirthdateConverter is a standard converter that implements the Converter interface and is not doing any magical. It works perfectly for other components. An interesting fact is, that the above javascript gets generated when I am using no converter at all or the standard date/time converters like f:convertDateTime provided by the RI. However, these don't provide the functionality I need.
    I have the bad feeling, that I am missing something. Does anyone else ran across this problem?
    Thanks,
    Herbert

    Frank,
    Thank you for your answer. I'm not using ADF BC, so is there a possible workaround? My model provides a standard java.util.Date. My converter looks like:
    public class BirthdateConverter implements Converter {
      public Object getAsObject(FacesContext facesContext, UIComponent uIComponent, String sDate) {
        Locale locale = facesContext.getCurrentInstance().getExternalContext().getRequestLocale();
        String pattern = AppUtil.getFourDigitYearPattern(DateFormat.SHORT);
        SimpleDateFormat sdf = new SimpleDateFormat(pattern, locale);
        java.util.Date d = sdf.parse(sDate);
        // converter logic
        return d;
      public String getAsString(FacesContext facesContext, UIComponent uIComponent, Object object) {
        if (object == null)
          return null;
        if (!(object instanceof Date))
          return object.toString();
        Locale locale = facesContext.getCurrentInstance().getExternalContext().getRequestLocale();
        String pattern = AppUtil.getFourDigitYearPattern(DateFormat.SHORT);
        SimpleDateFormat sdf = new SimpleDateFormat(pattern, locale);
        return sdf.format((java.util.Date)object);
    }AppUtil.getFourDigitYearPattern(DateFormat.SHORT) provides a date pattern, e.g. "M/d/yyyy" for locale en-us. In the above code I did not include try-catch blocks to make it more readable.
    Herbert
    Message was edited by:
    user575859

  • Calendar Popup Formatting

    Is there some way I can adjust the Calendar Popup formatting, especially the background colour.
    I imagine these formats are set in a CSS file somewhere, but would appreciate some help in finding them.
    Thanks

    From what I can tell when you place a date picker item on a page htmldb writes a script that calls the popup window. In this script it specifies the background color. I cannot see any way to change this though.
    When you inspect the source of the calendar popup there is not a link to any css file so that is not an option either.
    It looks like the background color is hard-coded somewhere in the htmldb engine. It would be a useful enhancement to add a link to a css file so we could customize the calendar.

  • Calendar Popup

    how can i insert calendar popup to my forms?

    There is no built-in date picker for forms created in Acrobat, but there is for XFA forms created in LiveCycle Designer.
    There is a date picker component that is designed for acroforms that you can download from: http://www.formrouter.com/tools/

  • Anyone built date/calendar popup??

    I have a third party calendar popup set of classes that I wish to use in a JTable.
    The JTable editor/renderer does not seem to work with this class. (Third party components fault)
    Has anyone developed their own calendar popup that can be used within a JTable to set dates.
    I'm working with JDK1.3, therefore cannot use JFormattedTextField, mores the pity!!!
    Any help/tips appreciated.
    Thanks,
    Rachel

    I did this about a year ago. I used Claude Dugay's JMaskField instead of JFormattedTextField. It's easy to find, but it needs to have some patches for a few quirks. You will probably recognize a lot of the code. I tried to make it handle a variety of Object types (Date, String, Calendar). I also needed an extra value (N/A for example). Here's the main class.import com.bbritta.jmaskfield.JMaskField;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.Border;
    import javax.swing.border.EmptyBorder;
    import javax.swing.border.EtchedBorder;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import javax.swing.plaf.basic.ComboPopup;
    import javax.swing.plaf.ComboBoxUI;
    import javax.swing.plaf.basic.BasicComboBoxEditor;
    import javax.swing.plaf.metal.MetalComboBoxUI;
    import com.sun.java.swing.plaf.motif.MotifComboBoxUI;
    import com.sun.java.swing.plaf.windows.WindowsComboBoxUI;
    import java.util.Calendar;
    import java.util.Date;
    import java.util.GregorianCalendar;
    import java.util.Vector;
    import java.util.EventListener;
    public class DateComboBox extends JComboBox {
        private final static SimpleDateFormat defaultSDF = new SimpleDateFormat("MM/dd/yyyy");
        SimpleDateFormat sdf;
        Class returnClass=null;
        FormattedCalendar fc = new FormattedCalendar(sdf);
        Object alternate=null;
        MyComboBoxEditor mcbe;
        KeyAdapter ka = new KeyAdapter() {
         public void keyReleased(KeyEvent ke) {
             JTextField jtf = (JTextField)ke.getSource();
             switch (ke.getKeyCode()) {
              case KeyEvent.VK_ESCAPE:
                  jtf.setText(fc.toString());
                  break;
              case KeyEvent.VK_ENTER:
                  setValue(jtf.getText());
                  javax.swing.FocusManager.getCurrentManager().focusNextComponent(jtf);
                  break;
        JMaskField jmf = null;
        JTextField editorComponent;
        boolean blockItemStateEvent=false, blockActionEvent=false;
        private DatePopup datePopup;
        public DateComboBox(JMaskField JMF, SimpleDateFormat SDF) {
         this(SDF);
         setEditor(mcbe = new MyComboBoxEditor(jmf=JMF));
         ((JTextField)getEditor().getEditorComponent()).addKeyListener(ka);
        public DateComboBox(JMaskField JMF) { this(JMF, defaultSDF); }
        public DateComboBox(SimpleDateFormat SDF) {
         setFormat(sdf=SDF);
         editorComponent = (JTextField)getEditor().getEditorComponent();
         addItem(fc);
         editorComponent.addKeyListener(ka);
        public DateComboBox() {
         this(defaultSDF);
        // JComboBox source code sez not to override this, but waddahell
        public void actionPerformed(ActionEvent ae) {
         setValue(getEditor().getItem());
        public void setReturnClass(Class aClass) {
         if (aClass==null || aClass==String.class || aClass==Date.class ||
                       aClass.isAssignableFrom(Calendar.class)) {
             returnClass=aClass;
         } else throw new IllegalArgumentException("Invalid return class");
        public Class getReturnClass() { return returnClass; }
        public void setSelectedItem(Object item) { setValue(item); }
        public void setValue(Object value) {
         ((JTextField)getEditor().getEditorComponent()).setEditable(true);
         Object oldSelectedItem = super.getSelectedItem();
         blockActionEvent=true;
         blockItemStateEvent=true;
         dataModel.setSelectedItem(null);
         blockActionEvent=false;
         blockItemStateEvent=false;
         if (value instanceof Date) {
             if (jmf!=null) jmf.setMaskDocument();
             fc.setTime((Date)value);
             super.setSelectedItem(fc);
         } else if (value instanceof Calendar) {
             if (jmf!=null) jmf.setMaskDocument();
             fc.setTime(((Calendar)value).getTime());
             super.setSelectedItem(fc);
         } else if (alternate!=null && alternate.toString().equalsIgnoreCase(value.toString())) {
             if (jmf!=null) jmf.setOrigDocument();
             super.setSelectedItem(alternate);
             ((JTextField)getEditor().getEditorComponent()).setEditable(false);
         } else if (value instanceof String) {
             try {
              fc.setTime((String)value);
              super.setSelectedItem(fc);
              if (jmf!=null) jmf.setMaskDocument();
             catch (ParseException pe) {
              if (jmf!=null) jmf.setMaskDocument();
              super.setSelectedItem(value);
              fireInvalidDate(new InvalidDateEvent(this, value));
         } else {
             if (jmf!=null) jmf.setMaskDocument();
             fireInvalidDate(new InvalidDateEvent(this, value));
        public void addInvalidDateListener(InvalidDateListener l) {
         listenerList.add(InvalidDateListener.class, l);
        public void removeInvalidDateListener(InvalidDateListener l) {
         listenerList.remove(InvalidDateListener.class, l);
        protected void fireInvalidDate(final InvalidDateEvent e) {
         final Object[] listeners = listenerList.getListenerList();
    //     System.out.println("SI="+super.getSelectedIndex()+", lc="+listeners.length);
         SwingUtilities.invokeLater(new Runnable() { public void run() {
             for (int i=listeners.length-2; i>=0; i-=2 ) {
              if (listeners==InvalidDateListener.class ) {
              ((InvalidDateListener)listeners[i+1]).invalidDate(e);
    protected void fireActionEvent() {
         if (!blockActionEvent) super.fireActionEvent();
    protected void fireItemStateChanged(ItemEvent e) {
         if (!blockItemStateEvent) super.fireItemStateChanged(e);
    public Object getValue() {
         Object selectedItem = super.getSelectedItem();
         if (selectedItem==fc) {
         if (jmf != null) jmf.setMaskDocument();
         if (returnClass==null || returnClass==Calendar.class) return fc;
         if (returnClass==Date.class) return fc.getTime();
         if (returnClass==String.class) return fc.toString();
         } else if (selectedItem==alternate) if (jmf!=null) jmf.setOrigDocument();
         else if (jmf!=null) jmf.setMaskDocument();
         return selectedItem;
    public void setAlternate(Object Alternate) {
         if (alternate != null) super.removeItem(alternate);
         datePopup.setAlternate(Alternate);
         alternate = Alternate;
         super.addItem(alternate);
    public Object getAlternate() { return alternate; }
    public void updateUI() {
         ComboBoxUI cui = (ComboBoxUI) UIManager.getUI(this);
         if (cui instanceof MetalComboBoxUI) { cui = new MetalDateComboBoxUI(); }
         else if (cui instanceof MotifComboBoxUI) { cui = new MotifDateComboBoxUI(); }
         else if (cui instanceof WindowsComboBoxUI) { cui = new WindowsDateComboBoxUI(); }
         setUI(cui);
    class MetalDateComboBoxUI extends MetalComboBoxUI {
         protected ComboPopup createPopup() { return datePopup = new DatePopup(comboBox, sdf); }
    class WindowsDateComboBoxUI extends WindowsComboBoxUI {
         protected ComboPopup createPopup() { return datePopup = new DatePopup(comboBox, sdf); }
    class MotifDateComboBoxUI extends MotifComboBoxUI {
         protected ComboPopup createPopup() { return datePopup = new DatePopup(comboBox, sdf); }
    public void setFormat(SimpleDateFormat SDF) {
         datePopup.setFormat(SDF);
         fc.setFormat(SDF);
    public SimpleDateFormat getFormat() { return sdf; }
    class DatePopup implements ComboPopup, MouseMotionListener, MouseListener,
                   KeyListener, PopupMenuListener, ActionListener {
    private static final SimpleDateFormat defaultSDF = new SimpleDateFormat("MM/dd/yy");
    // protected SimpleDateFormat dateFormat = new SimpleDateFormat("MMM d, yyyy");
    protected SimpleDateFormat dateFormat;// = new SimpleDateFormat("MM/dd/yy");
    protected DateComboBox comboBox;
    protected Calendar calendar;
    protected JPopupMenu popup;
    protected JLabel monthLabel;
    protected JPanel days = null, alternatePanel = new JPanel(new FlowLayout());
    protected JButton alternateButton = new JButton();
    protected Vector listenerComponents = new Vector();
    protected SimpleDateFormat monthFormat = new SimpleDateFormat("MMM yyyy");
    protected void setFormat(SimpleDateFormat SDF) { dateFormat=SDF; }
    protected Color selectedBackground, selectedForeground,
                   background, foreground;
    public DatePopup(JComboBox comboBox) {
         this(comboBox, defaultSDF);
    public DatePopup(JComboBox comboBox, SimpleDateFormat SDF) {
         dateFormat = SDF;
         this.comboBox = (DateComboBox)comboBox;
         calendar = Calendar.getInstance();
         // check Look and Feel
         background = UIManager.getColor("ComboBox.background");
         foreground = UIManager.getColor("ComboBox.foreground");
         selectedBackground = UIManager.getColor("ComboBox.selectionBackground");
         selectedForeground = UIManager.getColor("ComboBox.selectionForeground");
         alternatePanel.setBackground(background);
         alternatePanel.setOpaque(true);
         alternateButton.setBorder(BorderFactory.createRaisedBevelBorder());
         alternatePanel.add(alternateButton);
         alternateButton.addActionListener(this);
         initializePopup();
    //========================================
    // begin ComboPopup method implementations
    public void show() {
         try {
         // if setSelectedItem() was called with a valid date, adjust the calendar
         calendar.setTime( dateFormat.parse( comboBox.getSelectedItem().toString() ) );
         } catch (Exception e) {}
         updatePopup();
         popup.show(comboBox, 0, comboBox.getHeight());
    public void hide() {
         for (int i=0; i<listenerComponents.size(); i++) {
         Component c = (Component)listenerComponents.get(i);
         EventListener[] l = c.getListeners(MouseListener.class);
         for (int j=0; j<l.length; j++) c.removeMouseListener((MouseListener)l[j]);
         listenerComponents.removeAllElements();
         popup.removePopupMenuListener(this);
         popup.setVisible(false);
    protected JList list = new JList();
    public JList getList() { return list; }
    public MouseListener getMouseListener() { return this; }
    public MouseMotionListener getMouseMotionListener() { return this; }
    public KeyListener getKeyListener() { return this; }
    public boolean isVisible() { return popup.isVisible(); }
    public void uninstallingUI() { popup.removePopupMenuListener(this); }
    // end ComboPopup method implementations
    //======================================
    //===================================================================
    // begin Event Listeners
    // MouseListener
    public void mousePressed( MouseEvent e ) {}
    public void mouseReleased( MouseEvent e ) {}
    // something else registered for MousePressed
    public void mouseClicked(MouseEvent e) {
         if ( !SwingUtilities.isLeftMouseButton(e) ) return;
         if ( !comboBox.isEnabled() ) return;
         if ( comboBox.isEditable() ) {
         comboBox.getEditor().getEditorComponent().requestFocus();
         } else comboBox.requestFocus();
         togglePopup();
    protected boolean mouseInside = false;
    public void mouseEntered(MouseEvent e) { mouseInside = true; }
    public void mouseExited(MouseEvent e) { mouseInside = false; }
    // MouseMotionListener
    public void mouseDragged(MouseEvent e) {}
    public void mouseMoved(MouseEvent e) {}
    // KeyListener
    public void keyPressed(KeyEvent e) {}
    public void keyTyped(KeyEvent e) {}
    public void keyReleased( KeyEvent e ) {
         if ( e.getKeyCode() == KeyEvent.VK_SPACE ||
         e.getKeyCode() == KeyEvent.VK_ENTER ) {
         togglePopup();
    * Variables hideNext and mouseInside are used to
    * hide the popupMenu by clicking the mouse in the JComboBox
    public void popupMenuCanceled(PopupMenuEvent e) {}
    protected boolean hideNext = false;
    public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
         hideNext = mouseInside;
    public void popupMenuWillBecomeVisible(PopupMenuEvent e) {}
    // end Event Listeners
    //=================================================================
    //===================================================================
    // begin Utility methods
    protected void togglePopup() {
         if ( isVisible() || hideNext ) hide();
         else show();
         hideNext = false;
    // end Utility methods
    //=================================================================
    // Note *** did not use JButton because Popup closes when pressed
    protected JLabel createUpdateButton(final int field, final int amount) {
         final JLabel label = new JLabel();
         final Border selectedBorder = new EtchedBorder();
         final Border unselectedBorder = new EmptyBorder(selectedBorder.getBorderInsets(new JLabel()));
         label.setBorder(unselectedBorder);
         label.setForeground(foreground);
         label.addMouseListener(new MouseAdapter() {
              public void mouseReleased(MouseEvent e) {
              calendar.add(field, amount);
              updatePopup();
              public void mouseEntered(MouseEvent e) {
              label.setBorder(selectedBorder);
              public void mouseExited(MouseEvent e) {
              label.setBorder(unselectedBorder);
         return label;
    protected void setAlternate(Object Alternate) {
         if (Alternate != null) {
         alternateButton.setText(Alternate.toString());
         if (alternatePanel.getParent()!=popup) popup.add(alternatePanel, BorderLayout.SOUTH);
         } else popup.remove(alternatePanel);
    protected void initializePopup() {
         JPanel header = new JPanel(); // used Box, but it wasn't Opaque
         header.setLayout(new BoxLayout(header, BoxLayout.X_AXIS));
         header.setBackground(background);
         header.setOpaque(true);
         JLabel label;
         label = createUpdateButton(Calendar.YEAR, -1);
         label.setText("<<");
         label.setToolTipText("Previous Year");
         header.add(Box.createHorizontalStrut(12));
         header.add(label);
         header.add(Box.createHorizontalStrut(12));
         label = createUpdateButton(Calendar.MONTH, -1);
         label.setText("<");
         label.setToolTipText("Previous Month");
         header.add(label);
         monthLabel = new JLabel("", JLabel.CENTER);
         monthLabel.setForeground(foreground);
         header.add(Box.createHorizontalGlue());
         header.add(monthLabel);
         header.add(Box.createHorizontalGlue());
         label = createUpdateButton(Calendar.MONTH, 1);
         label.setText(">");
         label.setToolTipText("Next Month");
         header.add(label);
         label = createUpdateButton(Calendar.YEAR, 1);
         label.setText(">>");
         label.setToolTipText("Next Year");
         header.add(Box.createHorizontalStrut(12));
         header.add(label);
         header.add(Box.createHorizontalStrut(12));
         popup = new JPopupMenu();
         popup.setBorder(BorderFactory.createLineBorder(Color.black));
         popup.setLayout(new BorderLayout());
         popup.setBackground(background);
         popup.addPopupMenuListener(this);
         popup.add(BorderLayout.NORTH, header);
    private SimpleDateFormat dowSDF = new SimpleDateFormat("EEE");
    public void actionPerformed(ActionEvent ae) {
         comboBox.setSelectedItem(comboBox.getAlternate());
         hide();
    // update the Popup when either the month or the year of the calendar has been changed
    protected void updatePopup() {
         monthLabel.setText( monthFormat.format(calendar.getTime()) );
         if (days != null) {
         popup.remove(days);
         days = new JPanel(new GridLayout(0, 7));
         days.setBackground(background);
         days.setOpaque(true);
         Calendar setupCalendar = (Calendar) calendar.clone();
         setupCalendar.set(Calendar.DAY_OF_WEEK, setupCalendar.getFirstDayOfWeek());
         for (int i = 0; i < 7; i++) {
         int dayInt = setupCalendar.get(Calendar.DAY_OF_WEEK);
         JLabel label = new JLabel(dowSDF.format(setupCalendar.getTime()));
         label.setHorizontalAlignment(JLabel.CENTER);
         label.setForeground(foreground);
         days.add(label);
         setupCalendar.roll(Calendar.DAY_OF_WEEK, true);
         setupCalendar = (Calendar) calendar.clone();
         setupCalendar.set(Calendar.DAY_OF_MONTH, 1);
         int first = setupCalendar.get(Calendar.DAY_OF_WEEK);
         for (int i = 0; i < (first - 1); i++) days.add(new JLabel(""));
         for (int i = 1; i <= setupCalendar.getActualMaximum(Calendar.DAY_OF_MONTH); i++) {
         final int day = i;
         final JLabel label = new JLabel(String.valueOf(day));
         label.setHorizontalAlignment(JLabel.CENTER);
         label.setForeground(foreground);
         listenerComponents.add(label);
         label.addMouseListener(new MouseAdapter() {
              public void mouseReleased(MouseEvent e) {
                   label.setOpaque(false);
                   label.setBackground(background);
                   label.setForeground(foreground);
                   calendar.set(Calendar.DAY_OF_MONTH, day);
                   comboBox.setSelectedItem(calendar);
                   hide();
                   comboBox.requestFocus();
              public void mouseEntered(MouseEvent e) {
                   label.setOpaque(true);
                   label.setBackground(selectedBackground);
                   label.setForeground(selectedForeground);
              public void mouseExited(MouseEvent e) {
                   label.setOpaque(false);
                   label.setBackground(background);
                   label.setForeground(foreground);
         days.add(label);
         popup.add(BorderLayout.CENTER, days);
         popup.pack();
    class MyComboBoxEditor extends BasicComboBoxEditor {
    public MyComboBoxEditor() {}
    public MyComboBoxEditor(JMaskField JMF) {
         super.editor = JMF;

  • NetUI tags and calendar popups

    Does anybody have an example of a simple calendar popup that can work with NetUI
    tags. I downloaded a couple different solutions from the net and they work fine
    when I use simple html form tags, however don't seem to work if I use the netui
    tags.
    Thanks!
    Kunal

    use the netui tagID
    <netui:form tagId="aForm" >
    <netui:textbox datasource="{actionForm.firstname}" tagId="firstName">
    then
    alert(document.forms[getNetuiTagName("aForm",this)][getNetuiTagName("firstName",this)].value)

  • Calendar popups with NetUI tags

    Does anybody have an example of a simple calendar popup that can work with NetUI
    tags. I downloaded a couple different solutions from the net and they work fine
    when I use simple html form tags, however don't seem to work if I use the netui
    tags.
    Thanks!
    Kunal

    Mike,
    Doc of choice tag says
    The <netui-data:choice> tag must be used together with the <netui-data:choiceMethod> tag in order to achieve conditional rendering of the body of a particular <netui-data:choice> tag. A single <netui-data:choiceMethod> and one or more <netui-data:choice> tags should be nested within a <b><netui-data:repeaterItem></b> tag.
    In my case, I don't have any repeaterItem...
    I have a value in pageContext; I want to compare the its value with any value in jsp. I can go for <logic:equal> as in struts. But I dont wnat to use struts. I wnat to use netui's tags. Moreover I dont want to use scriplets..
    Then How?
    Thanks.
    Prakash

  • Calendar popup in a PDF form

    How do you create a popup calendar in a fillable PDF form?
    I am running Acrobat on a Mac Air with the current OS.

    There's no such component in PDF forms, only in those created in LiveCycle Designer.
    There are some third-party tools, though, that bring this functionality to PDF forms. The most known is the free one by FormRouter, which is based on form fields. The other is not free and is by fellow-expert Max Wyss, and it's based on a dialog object and therefore clutters the file less.

Maybe you are looking for