Date Picker for Adobe 10

From the little bit of research I've done, there is no date picker feature currently in Adobe 10.  I've been trying to find some kind of plug-in/add-on/something along those lines so I can include a date picker in an adobe form that I am setting up.  From what I understand, the jQuery widget is used for web pages which does me no good, unless of course I misunderstood that.  Any help would be appreciated.  Thanks.

Thanks for your help "try67".  It works like a charm.  The setup in Adobe 10 is a little different than it looks like it is in Adobe 9, but it still works well.  Although for one reason or another, my Javascripts folder isn't at any of the locations on your blog.  It is at:
C:\Program Files\Adobe\Acrobat 10.0\Acrobat\Javascripts
This could be because the machine that I use with Adobe 10 is a virtual machine, so I'm not sure if that has anything to do with it.
Thanks again.

Similar Messages

  • Date picker for af:inputDate   is not picking up the correct input date

    view source:
    <af:inputDate value="#{bindings.DateField.attributeValue}" label="#{bindings.DateField.hints.label}"
    required="#{bindings.DateField.hints.mandatory}"
    valueChangeListener="#{pageFlowScope.CollectApplicantInformation.datesItemChanged}"
    columns="#{bindings.DateField.hints.displayWidth}" shortDesc="#{CustomTooltip[DateField]}"
    autoSubmit="true" helpTopicId="AppDt" id="DateField" simple="true">
    <f:validator binding="#{bindings.DateField.validator}"/>
    *<f:converter converterId="CustomConverter"/>*
    </af:inputDate>
    Here I am not using <af:ConvertDateTime> insted using customConverter, so what code changes do I need to make sure the date picker always picks the already existind date in the inputDate rather picking the current date?
    Here is my CustomConverter.java
    CustomConverter.java
    public class CustomConverter extends DateTimeConverter implements ClientConverter, Converter
    public Object getAsObject(FacesContext context, UIComponent component, String value)
    String dataType = (String) resolveExpression("#{bindings." + component.getId() + ".attributeDef.javaType.name}");
    if (dataType != null && !dataType.equalsIgnoreCase("oracle.jbo.domain.Date") && !dataType.equalsIgnoreCase("oracle.jbo.domain.Timestamp"))
    String test = null;
    if (context == null || component == null)
    throw new NullPointerException();
    if (value != null)
    // To solve DB transaction dirty issue, Check isEmpty and return null.
    if (value.isEmpty())
    return null;
    // the "value" is stored on the value property of the component.
    // The Unified EL allows us to check the type
    ValueExpression expression = component.getValueExpression("value");
    if (expression != null)
    Class<?> expectedType = expression.getType(context.getELContext());
    if (expectedType != null)
    System.out.println("expectedType Value:::" + expectedType.getName());
    // try to convert the value (Object) to the TYPE of the "value" property
    // of the underlying JSF component
    try
    return TypeFactory.getInstance(expectedType, value);
    catch (DataCreationException e)
    String errorMessage;
    if (expectedType.equals(CustomNumber.class))
    errorMessage = "You can enter only Numbers in this field";
    else
    errorMessage = e.getMessage();
    if (errorMessage != null)
    FacesContext ctx = FacesContext.getCurrentInstance();
    FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Invalid Format" , errorMessage);
    ctx.addMessage(component.getClientId(), fm);
    catch (CustomDomainException e)
    int errorCode = e.getErrorMessageCode();
    String[] errorMessage = e.getErrorMessageParams();
    if (errorCode == 7 && errorMessage != null)
    String msg = "Invalid " + errorMessage[0];
    FacesContext ctx = FacesContext.getCurrentInstance();
    FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Application Error: ", msg);
    ctx.addMessage(component.getClientId(), fm);
    catch (JboException e)
    Throwable cause = e.getCause();
    if (cause == null)
    cause = e;
    test = "not good format";
    throw e;
    return null;
    else
    return value != null? value: null;
    public String getAsString(FacesContext context, UIComponent component, Object value)
    return value != null? value.toString(): null;
    public String getClientLibrarySource(FacesContext context)
    return null;
    @Override
    public Collection<String> getClientImportNames()
    return Collections.emptySet();
    @Override
    public String getClientScript(FacesContext context, UIComponent component)
    String formatMask = (String) resolveExpression("#{bindings." + component.getId() + ".format}");
    if (formatMask != null)
    String dataType = (String) resolveExpression("#{bindings." + component.getId() + ".attributeDef.javaType.name}");
    if (dataType.equalsIgnoreCase("oracle.jbo.domain.Date") || dataType.equalsIgnoreCase("oracle.jbo.domain.Timestamp"))
    if (component == null)
    _LOG.severe("The component is null, but it is needed for the client id, so no script written");
    return null;
    // Add a JavaScript Object to store the datefield formats
    // on the client-side. We currently store the format string
    // for each and every field. It'd be more efficient to have
    // an array of formats, then store for each field the
    // index of the format, especially if we could delay outputting
    // these objects to when the <form> closes.
    String clientId = component.getClientId(context);
    if (clientId != null)
    // =-=AEW Only if Javascript...
    Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
    // this fetch could be at the place where we append, but has been
    // moved ahead to optimize use of StringBuilder
    String jsPattern = getJSPattern(context, component);
    String loc = _getLocaleString(context);
    // FIX - figure out size!!!
    // 127 chars for javascript + length of jspattern + locale + 12 chars for
    // tranforming to name in the worst case.
    StringBuilder buff = new StringBuilder(139 + jsPattern.length() + loc.length());
    if (requestMap.get(_PATTERN_WRITTEN_KEY) == null)
    requestMap.put(_PATTERN_WRITTEN_KEY, Boolean.TRUE);
    // only create the _dfs object if it doesn't exist, so we don't
    // wipe out _dfs[xxx] values if we ppr the first date field on a
    // page with multiple date fields.
    buff.append("if(window['_dfs'] == undefined){var _dfs=new Object();}if(window['_dl'] == undefined){var _dl=new Object();}");
    buff.append("_dfs[\"");
    buff.append(clientId);
    buff.append("\"]=");
    buff.append(jsPattern);
    buff.append(";");
    buff.append("_dl[\"");
    buff.append(clientId);
    buff.append("\"]=");
    buff.append(loc);
    buff.append(";");
    return buff.toString();
    else
    LOG.severe("NULLCLINET_ID_NO_SCRIPT_RENDERED");
    return null;
    else
    return null;
    else
    return null;
    private String _getLocaleString(FacesContext context)
    Locale dateTimeConverterLocale = getLocale();
    if (dateTimeConverterLocale != null)
    Locale defaultLocale = RenderingContext.getCurrentInstance().getLocaleContext().getFormattingLocale();
    if (!(dateTimeConverterLocale.equals(defaultLocale)))
    String loc = dateTimeConverterLocale.toString();
    StringBuffer sb = new StringBuffer(2 + loc.length());
    sb.append("'");
    sb.append(loc);
    sb.append("'");
    return (sb.toString());
    return "null";
    @Override
    @Deprecated
    public String getClientConversion(FacesContext context, UIComponent component)
    String formatMask = (String) resolveExpression("#{bindings." + component.getId() + ".format}");
    if (formatMask != null)
    String dataType = (String) resolveExpression("#{bindings." + component.getId() + ".attributeDef.javaType.name}");
    if (dataType.equalsIgnoreCase("oracle.jbo.domain.Date") || dataType.equalsIgnoreCase("oracle.jbo.domain.Timestamp"))
    String jsPattern = getJSPattern(context, component);
    Map<String, String> messages = new HashMap<String, String>();
    if (jsPattern != null)
    Class<?> formatclass = formatMask.getClass();
    System.out.println("FormatClass::" + formatclass);
    System.out.println(" Format Mask : " + formatMask);
    // SimpleDateFormat sdfDestination = new SimpleDateFormat(formatMask);
    String pattern = formatMask; //getPattern();
    if (pattern == null)
    pattern = getSecondaryPattern();
    String key = getViolationMessageKey(pattern);
    Object[] params = new Object[]
    { "{0}", "{1}", "{2}" };
    Object msgPattern = getMessagePattern(context, key, params, component);
    //if hintFormat is null, no custom hint for date, time or both has been specified
    String hintFormat = _getHint();
    FacesMessage msg = null;
    String detailMessage = null;
    if (msgPattern != null)
    msg = MessageFactory.getMessage(context, key, msgPattern, params, component);
    detailMessage = XhtmlLafUtils.escapeJS(msg.getDetail());
    Locale loc = context.getViewRoot().getLocale();
    SimpleDateFormat formatter = new SimpleDateFormat(pattern, loc);
    java.lang.Object obj = resolveExpression("#{bindings." + component.getId() + ".attributeValue}");
    String databaseDate=null;
    if(obj!=null)
    databaseDate = obj.toString();
    DateFormat df = new SimpleDateFormat(pattern,loc);
    System.out.println("DateComponent input value :::::::::::::::::::::::::"+databaseDate);
    Date today;
    try {
    // System.out.println("Before Conversion::::::::::::"+df.parse(databaseDate).toString());
    if(databaseDate!=null)
    today = df.parse(databaseDate);
    else
    today = new Date();
    System.out.println("After Conversion Date :::::::::::::::::::::::::::::"+today.toString());
    //Date today = new Date();
    String dt = formatter.format(today);
    String exampleString = dt;
    String escapedType = XhtmlLafUtils.escapeJS(getType().toUpperCase());
    StringBuilder outBuffer = new StringBuilder();
    outBuffer.append("new TrDateTimeConverter(");
    outBuffer.append(jsPattern);
    // loc = getLocale();
    if (loc != null)
    outBuffer.append(",'");
    outBuffer.append(loc.toString());
    outBuffer.append("','");
    else
    outBuffer.append(",null,'");
    outBuffer.append(exampleString);
    outBuffer.append("','");
    outBuffer.append(escapedType);
    outBuffer.append("'");
    if (msgPattern != null || hintFormat != null)
    messages.put("detail", detailMessage);
    messages.put("hint", hintFormat);
    outBuffer.append(',');
    // try
    // JsonUtils.writeMap(outBuffer, messages, false);
    // catch (IOException e)
    // outBuffer.append("null");
    outBuffer.append(')'); // 2
    return outBuffer.toString();
    catch(ParseException e)
    System.out.println("Parse Exception :::::::::::::::::::::"+e);
    return null;
    else
    // no pattern-matchable date
    return null;
    else
    return null;
    else
    return null;
    protected String getJSPattern(FacesContext context, UIComponent component)
    String jsPattern = null;
    String datePattern = (String) resolveExpression("#{bindings." + component.getId() + ".format}");
    if (datePattern != null)
    String secondaryPattern = getSecondaryPattern();
    if (datePattern != _NO_JS_PATTERN)
    int length = datePattern.length() * 2 + 2;
    if (secondaryPattern != null)
    length = length + 3 + secondaryPattern.length() * 2;
    StringBuilder outBuffer = new StringBuilder(length);
    jsPattern = _getEscapedPattern(outBuffer, datePattern, secondaryPattern);
    else
    jsPattern = datePattern;
    return jsPattern;
    private static void _escapePattern(StringBuilder buffer, String pattern)
    buffer.append('\'');
    XhtmlUtils.escapeJS(buffer, pattern);
    buffer.append('\'');
    private static String _getEscapedPattern(StringBuilder buffer, String pattern, String secondaryPattern)
    if (secondaryPattern != null)
    buffer.append('[');
    _escapePattern(buffer, pattern);
    if (secondaryPattern != null)
    buffer.append(",'");
    XhtmlUtils.escapeJS(buffer, secondaryPattern);
    buffer.append("']");
    return buffer.toString();
    private String _getHint()
    String type = getType();
    if (type.equals("date"))
    return getHintDate();
    else if (type.equals("both"))
    return getHintBoth();
    else
    return getHintTime();
    public static Object resolveExpression(String pExpression)
    FacesContext facesContext = FacesContext.getCurrentInstance();
    Application app = facesContext.getApplication();
    ExpressionFactory elFactory = app.getExpressionFactory();
    ELContext elContext = facesContext.getELContext();
    ValueExpression valueExp = null;
    valueExp = elFactory.createValueExpression(elContext, pExpression, Object.class);
    return valueExp.getValue(elContext);
    private static final String _NO_JS_PATTERN = new String();
    private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(DateTimeConverter.class);
    // RenderingContext key indicating the _dateFormat object
    // has been created
    private static final String _PATTERN_WRITTEN_KEY = "org.apache.myfaces.trinidadinternal.convert.DateTimeConverter._PATTERN_WRITTEN";
    *Problem is if any input date componet is displaying other than current date then the date picker is always picking the current date rather existing date*
    Please suggest me where to make changes?
    Edited by: 858782 on Oct 3, 2011 7:43 AM
    Edited by: 858782 on Oct 3, 2011 11:44 PM

    I need custom date foramts to be applied for different inputDates which are not defined in <af:convertDateTime>
    Thanks
    Edited by: 858782 on Oct 13, 2011 4:59 PM

  • Date picker for 64 bit windows 8 and 32 bit 2010 excel

    I'm looking for step by step instructions on how to add a pop up calender to chose a date in 2010 Excel.  There is none listed in the addition toolbox controls, where and how would I install this? 

    Hi,
    Please go to the following path to find the Microsoft Date and Time Picker:
    Excel 2010 > Developer tabe > Insert > ActiveX bottom right > More > MIcrosoft Date and Time Picker (SP4). 
    For more detail information, please refer to the following link:
    http://social.msdn.microsoft.com/Forums/en-US/26f6adea-c723-4815-92ba-59a0c846a80a/microsoft-date-picker-excel-2010?forum=exceldev
    http://www.logicwurks.com/CodeExamplePages/EDatePickerControl.html
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Better date picker for ApEx 3.2?

    One of my least-liked features in ApEx 3.2 is the poor performance of the date picker popup. It redraws whenever the user changes the month or year, and it takes so long, that I've found most of the time, a user will change both fields in the time it takes for the first one to take effect, so the second change ends up being ignored.
    Ideally, I would like to find a drop-in replacement for the built-in date picker that will do everything in JavaScript, within the window, and bonus points for some additional validation options (like min/max date). The date picker in ApEx 4 is actually perfect, I think.
    So, my question: 1) Has anybody tried to backport the date picker from ApEx 4 into an ApEx 3.2 application? Can this be done without substantial rewiring of the calling page? 2) If not, can anybody recommend a good replacement for the built-in one in 3.2? Again, my goal is to just replace the JavaScript call on that form element with a different one, and require no other changes to the page.
    Thanks,
    Keith

    Thanks, Dan -- you mentioned this in another thread, too, and I was just starting to look into whether I could simply drop in this datepicker in place of the one in ApEx. It looks like I can, but if you're verifying that this is the case, then this definitely meets my needs, and I'll eagerly start looking into this.
    Still, I think it would be cool if someone backported the one in ApEx 4. That one is so much nicer! :-)
    Cheers!

  • Date Picker for Query Variable

    Hello,
    I have a query, which has a input variable as date. For the Query Variables when i drag and create an input form, i have the field as input field. How do i change this field to a date picker drop down...I do not get any option to make it as a date picker/calendar...
    REgards,
    Vikram

    Hello Vikram,
    If I understand correctly, the field type is String, but it represents a Date. You want to be able to edit it as such.
    1. In the input Form open the Define Data dialog (using the Right Click context menu) and add a field of type Date (letu2019s say its name is u201CDATE1u201D).
    2. On the link between the input Form and the Service Open the Map Data dialog using Right Click => Map Datau2026
    3. Find the relevant Field Assign in the table. Here you want to get the Date value converted into a String. From the Assign Value drop down you can choose Define Expression to open the Dynamic Expression Editor (you can skip this and write the value yourself in the Assign Value input if you know what to write).
    4. On the right hand side you have model elements and functions to create an expression. You can use the function DSTR(@DATE,[format]) u2013 where parameter 1 is the Date field and parameter 2 is the Format (optional). The function returns a String representation of a given Date.
    5. Your expression can look like this for example: =DSTR(@DATE1,"dd/mm/yyyy"), assuming the name of the new Date field in the Form is DATE1.
    6. You can remove the old Text field from the Input Form if you donu2019t need it u2013 using the Define Data dialog.
    Hope this helps,
    Udi

  • Date picker not showing up in iOS Reader with multiple dates?

    Hi all,
    The date picker for iOS shows up for forms with a single date box. However, with multiple forms, the keyboard pops up instead of the date picker. It still handles correctly formatting-wise, but it's become a bit of hassle with having to type the date instead of simply filling out today. Is this a bug or by design?

    Hi jncasino,
    We are not able to reproduce this issue at our end. Could you please share the file having this issue to help us investigate and fix this issue?
    Thanks,
    -Shilpi

  • Discoverer viewer date picker

    Hi All,
    Is it possible to have a date picker for date fields in discoverer viewer?
    Regards,
    Nav

    Hi
    There is no code to use here, this is all done by the end user inside the Plus worksheet.
    First of all, your Discoverer administrator needs to create two or more lists of values on related items within the folder, for example on the Year, Quarter, Month and Date.
    In the end user tool, the user creates a set of conditions on these items presenting the highest level first, for example the year, followed by the next item in the chain, for example the Quarter and so on.
    In the sub conditions, for example on the Quarter, the user checks the box which asks whether the values for this item should be based on a previous selection. You then tell Discoverer to use the previous selection thus the list of values for Quarter will be restricted to the year or years selected in the first condition. You simply repeat this exercise for Month and then Day.
    Do you have a copy of my Oracle Discoverer 10g Handbook? If so, you will find a full description of cascading parameters in there.
    If you or your users don't know how to do this you may want to consider taking some training as this is standard functionality within the Plus tool and you would expect report writers to know how to do this.
    Best wishes
    Michael

  • Date Picker based on transient field

    Hi,
    JDev 10.1.3, ADF, BC4J:
    I have a jsp with two date fields that I use for searching. I have created a form bean that stores these fields as java.sql.Date types, and also generated a data control from this form bean.
    The problem is, I want to display these fields as date pickers in my browser.
    If I have a data-bound date field I can just drag it on to the page and select to drop it as type "Input render". This will create the date picker for me.
    However, if I do the same thing with my non-data-bound dates, they do not appear on the resulting page.
    Is there a way of creating date pickers based on transient (non-data-bound) fields?
    Cheers,
    Alex.

    Field validation assumes that the field being validated is to the left of the operator in the syntax. Since your validation requirement is complex, you would use the IIf statement.
    This is the syntax you should use for the Status field:
    =IIf((FieldValue('&lt;Status&gt;') = 'Commit' AND &#91;&lt;ClosedDate&gt;&#93; &gt; Today() + 90) OR (FieldValue('&lt;Status&gt;') &lt;&gt; 'Commit'),&#91;&lt;Status&gt;&#93;,"Invalid")
    You would build the syntax for Closed Date similarly. You would want to place this on all the affected fields to ensure it is called at the appropriate time. You should also test that it runs as expected when you edit other fields as well. This is another thread that talks about this issue: Re: Contact Field Validation (Email, Work Phone #, Mobile Phone #)
    Good Luck,
    Thom

  • Date Field Input Box in data  table does not provide date picker???

    hello everybody,
    In my JSF page i have a data table in which i have a input text field of date type. my problem is for the input box date picker is not available. though i can have date picker for a date filed outside the datatable. another problem is for the date filed validation in the browser is not available too. so how can i get the helper calender and browser validation? plz help. ASAP
    with regards,
    sailajoy
    Edited by: sailajoy on Jan 7, 2009 12:42 PM

    You are absolutely correct Sir.
    I am using IBM Websphere for developing JSF and the component is
    <h:inputText id="txtBirthDt" size="11">
    <f:convertDateTime pattern="dd/MM/yyyy" /><hx:inputHelperDatePicker />          
    <hx:inputHelperAssist validation="true" errorClass="inputText_Error" errorAction="selected"/>
    <hx:validateDateTimeRange maximum="#{now}" /></h:inputText>
    Both the helper calender and the validation part for the date field is not working if it is included in data table. Please Help.

  • Java Swing Date Picker

    Hi all,
    can any one tell me the best date picker for my swing application, it should be very simple and work fast for my application

    Hi,
    Here is one more DatePicker, the usage is mentioned in the main()
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Cursor;
    import java.awt.Dimension;
    import java.awt.Font;
    import java.awt.FontMetrics;
    import java.awt.Graphics;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import java.awt.GridLayout;
    import java.awt.Insets;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    import java.util.EventObject;
    import java.util.GregorianCalendar;
    import java.util.LinkedList;
    import javax.swing.*;
    import javax.swing.border.BevelBorder;
    import javax.swing.border.LineBorder;
    import javax.swing.event.CellEditorListener;
    import javax.swing.event.ChangeEvent;
    import javax.swing.event.EventListenerList;
    import javax.swing.table.AbstractTableModel;
    import javax.swing.table.TableCellEditor;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.TableColumn;
    import javax.swing.table.TableColumnModel;
    * This is a simple Calendar component written in single class. This is a
    * JInternalFrame. Instantiate with public constructor and add AbstractAction
    * using addAction() method and implement action performed method the,
    * ActionEvent source contains the GregorianCalendar of selected Date on the
    * component. Example usage is in main()
    class JCalendar extends JInternalFrame {
         //Define the Button ActionCommands
         private final static String incMonth = "INC_MONTH";
         private final static String incYear = "INC_YEAR";
         private final static String incDecade = "INC_DECADE";
         private final static String decMonth = "DEC_MONTH";
         private final static String decYear = "DEC_YEAR";
         private final static String decDecade = "DEC_DECADE";
         private AbstractTableModel tableModel;
         private JTable table;
         private JScrollPane scrollPane;
         private String[] monthNames = { "JAN", "FEB", "MAR", "APR", "MAY", "JUN",
                   "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" };
         private String[] columnNames = { "SUN", "MON", "TUE", "WED", "THU", "FRI",
                   "SAT" };
         private volatile GregorianCalendar calendar = new GregorianCalendar();
         private volatile int selectedYear = calendar.get(Calendar.YEAR);
         private volatile int selectedMonth = calendar.get(Calendar.MONTH);
         private volatile int selectedDate = calendar.get(Calendar.DATE);
         private LinkedList<Action> actionListenerList = new LinkedList<Action>();
         private JLabel status = new JLabel();
         public JCalendar() {
              super("", false, false, false, false);
              buildMonthYearGUI();
              buildGUI();
              getContentPane().add(status, BorderLayout.SOUTH);
              // setDates();
              ((javax.swing.plaf.basic.BasicInternalFrameUI) getUI())
                        .setNorthPane(null);
              setBorder(new LineBorder(Color.BLACK));
              setSize(230, 140);
         private GregorianCalendar getSelectedDate() {
              GregorianCalendar finalCalendar = new GregorianCalendar();
              finalCalendar.set(Calendar.DATE, calendar.get(Calendar.DATE));
              finalCalendar.set(Calendar.MONTH, calendar.get(Calendar.MONTH));
              finalCalendar.set(Calendar.YEAR, calendar.get(Calendar.YEAR));
              return finalCalendar;
         public void addAction(Action action) {
              actionListenerList.add(action);
         protected void buildMonthYearGUI() {
              final JLabel label = new JLabel(monthNames[selectedMonth] + " "
                        + selectedYear);
              label.setAlignmentX(JLabel.CENTER);
              label.setForeground(Color.DARK_GRAY);
              label.setBorder(new LineBorder(Color.DARK_GRAY));
              class Convenience {
                   public JHyperLink buildLink(String label, String actionCmd,
                             Action listener) {
                        JHyperLink link = new JHyperLink();
                        link.setText(label);
                        listener.putValue(Action.ACTION_COMMAND_KEY, actionCmd);
                        link.addAction(listener);
                        link.setBorder(new LineBorder(Color.DARK_GRAY));
                        return link;
              }// end convenience
              Convenience convenience = new Convenience();
                   class IncDecAction extends AbstractAction {
                   private String getLabelText() {
                        return monthNames[selectedMonth] + " " + selectedYear;
                   public void actionPerformed(ActionEvent e) {
                        String actionCmd = e.getActionCommand().trim();
                        if(actionCmd.equalsIgnoreCase(decDecade)){
                             selectedYear = selectedYear-10;
                             label.setText(getLabelText());
                        }else if(actionCmd.equalsIgnoreCase(incDecade)){
                             selectedYear = selectedYear +10;
                             label.setText(getLabelText());
                        }else if (actionCmd.equalsIgnoreCase(decYear)) {
                             selectedYear--;
                             calendar.set(Calendar.YEAR, selectedYear);
                             label.setText(getLabelText());
                        } else if (actionCmd.equalsIgnoreCase(incYear)) {
                             selectedYear++;
                             calendar.set(Calendar.YEAR, selectedYear);
                             label.setText(getLabelText());
                        } else if (actionCmd.equalsIgnoreCase(decMonth)) {
                             if (selectedMonth == Calendar.JANUARY) {
                                  selectedMonth = Calendar.DECEMBER;
                                  selectedYear--;
                                  calendar.set(Calendar.YEAR, selectedYear);
                             } else {
                                  selectedMonth--;
                             calendar.set(Calendar.MONTH, selectedMonth);
                             label.setText(getLabelText());
                        } else if (actionCmd.equalsIgnoreCase(incMonth)) {
                             if (selectedMonth == Calendar.DECEMBER) {
                                  selectedMonth = Calendar.JANUARY;
                                  selectedYear++;
                                  calendar.set(Calendar.YEAR, selectedYear);
                             } else {
                                  selectedMonth++;
                             calendar.set(Calendar.MONTH, selectedMonth);
                             label.setText(getLabelText());
                        if (tableModel != null) {
                             tableModel.fireTableStructureChanged();
                             tableModel.fireTableDataChanged();
              //AbstractAction listener = new IncDecAction();
              JHyperLink decDecButton = convenience.buildLink("<<<", decDecade, new IncDecAction());
              JHyperLink incDecButton = convenience.buildLink(">>>", incDecade, new IncDecAction());
              JHyperLink decYearButton = convenience.buildLink(" << ", decYear, new IncDecAction());
              JHyperLink incYearButton = convenience.buildLink(" >> ", incYear, new IncDecAction());
              JHyperLink decMonthButton = convenience.buildLink(" < ", decMonth, new IncDecAction());
              JHyperLink incMonthButton = convenience.buildLink(" > ", incMonth, new IncDecAction());
              JPanel monthYearPane = new JPanel();
              monthYearPane.setLayout(new GridBagLayout());
              GridBagConstraints constraints = new GridBagConstraints();
              constraints.insets = new Insets(2,2,2,2);
              constraints.gridx = 0;
              monthYearPane.add(decDecButton, constraints);
              constraints.gridx = 1;
              monthYearPane.add(decYearButton, constraints);
              constraints.gridx = 2;
              monthYearPane.add(decMonthButton, constraints);
              constraints.gridx = 3;
              constraints.weightx = 1;
              monthYearPane.add(label, constraints);
              constraints.gridx = 4;
              constraints.weightx = 0;
              monthYearPane.add(incMonthButton, constraints);
              constraints.gridx = 5;
              monthYearPane.add(incYearButton, constraints);
              constraints.gridx = 6;
              monthYearPane.add(incDecButton, constraints);
              monthYearPane.setBorder(new LineBorder(Color.GRAY));
              getContentPane().add(monthYearPane, BorderLayout.NORTH);
         protected void buildGUI() {
              tableModel = new AbstractTableModel() {
                   public boolean isCellEditable(int row, int column) {
                        return true;
                   public Class getColumnClass(int columnIndex) {
                        return String.class;
                   @Override
                   public String getColumnName(int columnIndex) {
                        return columnNames[columnIndex];
                   public int getRowCount() {
                        return calendar.getActualMaximum(Calendar.WEEK_OF_MONTH);
                        // throw new UnsupportedOperationException("Not supported
                        // yet.");
                   public int getColumnCount() {
                        return 7;
                        // throw new UnsupportedOperationException("Not supported
                        // yet.");
                   public Object getValueAt(int rowIndex, int columnIndex) {
                        //System.out.println("Get Value method called");
                        int day_of_week = columnIndex + 1;
                        int week_of_month = rowIndex + 1;
                        GregorianCalendar localCalendar = new GregorianCalendar();
                        localCalendar.set(Calendar.MONTH, selectedMonth);
                        localCalendar.set(Calendar.YEAR, selectedYear);
                        int current_month = localCalendar.get(Calendar.MONTH);
                        localCalendar.set(Calendar.WEEK_OF_MONTH, week_of_month);
                        localCalendar.set(Calendar.DAY_OF_WEEK, day_of_week);
                        if (current_month != localCalendar.get(Calendar.MONTH))
                             return null;
                        return localCalendar.get(Calendar.DATE);
                        // throw new UnsupportedOperationException("Not supported
                        // yet.");
              class JHyperLinkRenderer extends JHyperLink implements TableCellRenderer,     TableCellEditor
                   protected String plainText = "";
                   public JHyperLinkRenderer() {
                   private void setDate() {
                        calendar.set(Calendar.DATE, Integer.parseInt(plainText));
                   public void setText(String text) {
                   plainText = text;
                   super.setText("<html><u>" + text + "</u></html>");
                   if(plainText != null && !plainText.equalsIgnoreCase("")){
                        this.setToolTipText(new Integer(selectedMonth+1).toString()+"/"+plainText+"/"+new Integer(selectedYear).toString());
                   protected void fireMouseEntered(MouseEvent me) {
                        fireActionEvent();
                   protected void fireMouseExited(MouseEvent me) {
                   //This is overiden to change the behavior
                   protected void fireActionEvent() {
    * The actionListenerList variable is defined at Global
    * JCalendar Level
                        for (Action l : actionListenerList) {
                             Object source = null;
                             if (plainText != null && !plainText.equalsIgnoreCase("")) {
                                  // calendar.set(Calendar.DATE, Integer.parseInt(plainText));
                                  setDate();
                                  source = getSelectedDate();
                             } else {
                                  source = this;
                             ActionEvent e = new ActionEvent(source,
                                       ActionEvent.ACTION_PERFORMED, (String) l
                                                 .getValue(Action.ACTION_COMMAND_KEY));
                             l.actionPerformed(e);
                   public Component getTableCellRendererComponent(JTable table,
                             Object value, boolean isSelected, boolean hasFocus,
                             int row, int column) {
                        value = tableModel.getValueAt(row, column);
                        setText("");
                        setBorder(null);
                        setOpaque(true);
                        if (column == 0 || column == 6) {
                             setBackground(Color.LIGHT_GRAY);
                        } else {
                             setBackground(table.getBackground());
                        if (value != null) {
                             setText(value.toString());
                             this.setHorizontalAlignment(JLabel.CENTER);
                             // this.setBorder(border);
                             this.setForeground(Color.DARK_GRAY);
                             // this.setBackground(Color.RED);
                             if (isSelected) {
                                  setForeground(Color.BLUE);
                                  // setBorder(new LineBorder(Color.BLUE));
                                  BevelBorder border = new BevelBorder(BevelBorder.RAISED);
                                  setBorder(border);
                             if(value.toString().equalsIgnoreCase(new Integer(selectedDate).toString())) {
                                  setBackground(Color.GREEN);
                                  BevelBorder border = new BevelBorder(BevelBorder.RAISED);
                        return this;
              //Cell Editor Implementations
                   public Component getTableCellEditorComponent(JTable table,
                             Object value, boolean isSelected, int row, int column) {
                        // setText("");
                        if (value != null) {
                             setText(value.toString());
                             this.setHorizontalAlignment(JLabel.CENTER);
                             setForeground(Color.BLUE);
                             BevelBorder border = new BevelBorder(BevelBorder.RAISED);
                             setBorder(border);
                        } else {
                             setText("");
                        return this;
                   protected EventListenerList listenerList = new EventListenerList();
                   protected ChangeEvent changeEvent = new ChangeEvent(this);
                   public void addCellEditorListener(CellEditorListener listener) {
                        listenerList.add(CellEditorListener.class, listener);
                   public void removeCellEditorListener(CellEditorListener listener) {
                        listenerList.remove(CellEditorListener.class, listener);
                   protected void fireEditingStopped() {
                        CellEditorListener listener;
                        Object[] listeners = listenerList.getListenerList();
                        for (int i = 0; i < listeners.length; i++) {
                             if (listeners[i] == CellEditorListener.class) {
                                  listener = (CellEditorListener) listeners[i + 1];
                                  listener.editingStopped(changeEvent);
                   protected void fireEditingCanceled() {
                        CellEditorListener listener;
                        Object[] listeners = listenerList.getListenerList();
                        for (int i = 0; i < listeners.length; i++) {
                             if (listeners[i] == CellEditorListener.class) {
                                  listener = (CellEditorListener) listeners[i + 1];
                                  listener.editingCanceled(changeEvent);
                   public void cancelCellEditing() {
                        fireEditingCanceled();
                   public boolean stopCellEditing() {
                        fireEditingStopped();
                        return true;
                   public boolean isCellEditable(EventObject event) {
                        boolean flag = false;
                        if(event instanceof MouseEvent) {
                             MouseEvent evt = (MouseEvent)event;
                             if(evt.getClickCount() > 1) flag = true;
                        return flag;
                   public boolean shouldSelectCell(EventObject event) {
                        return true;
                   public Object getCellEditorValue() {
                        //return null;
                        return this.getText();
              JHyperLinkRenderer editorRenderer = new JHyperLinkRenderer();
              table = new JTable(tableModel);
              // Set the CellRenderer
              table.setDefaultRenderer(String.class, editorRenderer);
              table.setDefaultEditor(String.class, editorRenderer);
              table.getTableHeader().setReorderingAllowed(false);
              table.getColumnModel().setColumnMargin(5);
              table.putClientProperty("terminateEditOnFocusLost",Boolean.TRUE);
              table.setRequestFocusEnabled(false);
              table.setRowSelectionAllowed(false);
              // table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
              // table.setCellSelectionEnabled(true);
              // table.setShowGrid(false);
              scrollPane = new JScrollPane(table);
              scrollPane.setBorder(new LineBorder(Color.GRAY));
              getContentPane().add(scrollPane, BorderLayout.CENTER);
         // Local Inner JHyperLink Label class
         class JHyperLink extends JLabel {
              //This should be Strictly private
              private final LinkedList<Action> actionListenerList = new LinkedList<Action>();
              public JHyperLink() {
                   super("");
                   addMouseListener(new MouseAdapter() {
                        public void mouseEntered(MouseEvent me) {
                             fireMouseEntered(me);
                        public void mouseExited(MouseEvent me) {
                             fireMouseExited(me);
                             // status.removeAll();
                        public void mouseClicked(MouseEvent me) {
                             fireActionEvent();
                   //setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
              protected void fireMouseEntered(MouseEvent me) {
              protected void fireMouseExited(MouseEvent me) {
              public void addAction(Action l) {
                   if (!actionListenerList.contains(l)) {
                        actionListenerList.add(l);
              public void removeAction(Action l) {
                   actionListenerList.remove(l);
              protected void fireActionEvent() {
                   for (Action l : actionListenerList) {
                        Object source = null;
                             source = this;
                        ActionEvent e = new ActionEvent(source,
                                  ActionEvent.ACTION_PERFORMED, (String) l
                                            .getValue(Action.ACTION_COMMAND_KEY));
                        l.actionPerformed(e);
         public static void main(String[] args) {
              final String calCmd = "CALENDAR_ACTION";
              final JCalendar calendar = new JCalendar();
              calendar.setVisible(true);
              calendar.setLocation(75, 75);
              AbstractAction calendarAction = new AbstractAction() {
                   public void actionPerformed(ActionEvent e) {
                        if (e.getActionCommand().equalsIgnoreCase(calCmd)) {
                             if (e.getSource() != null
                                       && e.getSource() instanceof GregorianCalendar) {
                                  GregorianCalendar selCal = (GregorianCalendar) e
                                            .getSource();
                                  System.out.println("The Selected Date is :"
                                            + selCal.get(Calendar.MONTH) + "/"
                                            + selCal.get(Calendar.DATE) + "/"
                                            + selCal.get(Calendar.YEAR));
                                  calendar.dispose();
              calendarAction.putValue(Action.ACTION_COMMAND_KEY, calCmd);
              calendar.addAction(calendarAction);
              // calendar.pack();
              JFrame frame = new JFrame();
              JDesktopPane desk = new JDesktopPane();
              frame.setContentPane(desk);
              desk.add(calendar);
              frame.setLocation(50, 50);
              frame.setSize(400, 400);
              frame.setVisible(true);
    Cheers
    Ram

  • Looking for a "free" Date Picker

    I'm looking for a free to download and use Date Picker that I can integrate into a small Swing app. Nothing fancy, just a calendar (probably using a JTable) and the ability to select a day of year/month and (possibly) a time of day.
    I'm searching google but they're all commercial licenses and I'm simply building this app as a learning process, not for profit.
    If there's nothing out there, I'll just stick with my series of combo-boxes :)
    Cheers,
    Chris

    Oh yeah, I should point out that I'm not just being lazy. I've spent a while trying to build it myself to no avail. I got as far as displaying the grid :P
    http://www.w3style.co.uk/~d11wtq/datepicker.png (out of date, the days are correct now)
    package org.w3style.calendar;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.*;
    public class CalendarPanel extends JPanel
         protected CalendarEventController controller = null;
         public CalendarModel model = null;
         //JComponents
         protected JComboBox monthDropdown = null;
         protected JSpinner yearDropdown = null;
         protected JTable grid = null;
         public CalendarPanel(String title)
              super(new GridBagLayout());
              this.model = new CalendarModel();
              this.controller = new CalendarEventController();
              this.controller.setUI(this);
              this.controller.setModel(this.model);
              this.setBorder(BorderFactory.createTitledBorder(title));
              GridBagConstraints c = new GridBagConstraints();
              c.gridx = 0;
              c.gridy = 0;
              c.fill = GridBagConstraints.HORIZONTAL;
              c.anchor = GridBagConstraints.WEST;
              this.addMonths(c);
              c.gridx = 1;
              c.anchor = GridBagConstraints.EAST;
              c.fill = GridBagConstraints.NONE;
              this.addYears(c);
              c.gridx = 0;
              c.gridy = 1;
              c.gridwidth = 2;
              this.addTable(c);
         protected void addMonths(GridBagConstraints c)
              String[] months = this.model.getMonths();
              if (this.monthDropdown == null)
                   this.monthDropdown = new JComboBox(months);
              int monthNow = this.model.getCurrentMonth();
              this.monthDropdown.setSelectedIndex(monthNow);
              this.model.setSelectedMonth(monthNow);
              this.controller.addMonthDropdown(this.monthDropdown);
              this.add(this.monthDropdown, c);
         public JComboBox getMonthDropdown()
              return this.monthDropdown;
         protected void addYears(GridBagConstraints c)
              this.yearDropdown = new JSpinner(this.model.getYearSpinnerModel());
              this.yearDropdown.setEditor(new JSpinner.DateEditor(this.yearDropdown, "yyyy"));
              this.add(this.yearDropdown, c);
         protected void addTable(GridBagConstraints c)
              JPanel box = new JPanel(new GridBagLayout());
              GridBagConstraints myC = new GridBagConstraints();
              myC.gridx = 0;
              myC.gridy = 0;
              this.grid = new JTable(this.model.getTableModel());
              this.configureTable();
              box.add(this.grid.getTableHeader(), myC);
              myC.gridy = 1;
              box.add(this.grid, myC);
              this.add(box, c);
         public void configureTable()
              this.grid.setDragEnabled(false);
              this.grid.getTableHeader().setReorderingAllowed(false);
              this.grid.getTableHeader().setResizingAllowed(false);
              CalendarCellRenderer renderer = new CalendarCellRenderer();
              renderer.setParentUI(this);
              TableColumn col = null;
              for (int i = 0; i < 7; i++)
                   col = this.grid.getColumnModel().getColumn(i);
                   col.setPreferredWidth(25);
                   col.setCellRenderer(renderer);
              this.grid.setSelectionBackground(new Color((float)0.7, (float)0.86, (float)1.0));
              this.grid.setSelectionForeground(Color.black);
              this.grid.setShowGrid(false);
              this.grid.setRowHeight(20);
              if (this.model.getSelectedMonth() == this.monthDropdown.getSelectedIndex())
                   int r = this.model.getSelectedGridRow();
                   this.grid.setRowSelectionInterval(r, r);
                   int c = this.model.getSelectedGridColumn();
                   this.grid.setColumnSelectionInterval(c, c);
         public JTable getGrid()
              return this.grid;
    * Manages the rendering of the cells in the calendar
    package org.w3style.calendar;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.*;
    import java.awt.event.*;
    * This is just a basic extension of the DefaultTableCellRender from the current L&F
    public class CalendarCellRenderer extends DefaultTableCellRenderer
          * The current row being rendered
         protected int row;
          * The current column being rendered
         protected int col;
          * If this cell is part of the "selected" row
         protected boolean isSelected;
          * The table being rendered
         protected JTable tbl;
         protected CalendarPanel parentUI = null;
         public void setParentUI(CalendarPanel p)
              this.parentUI = p;
          * Fetch the component which renders the cell ordinarily
          * @param JTable The current JTable the cell is in
          * @param Object The value in the cell
          * @param boolean If the cell is in the selected row
          * @param boolean If the cell is in focus
          * @param int The row number of the cell
          * @param int The column number of the cell
          * @return Component
         public Component getTableCellRendererComponent(JTable tbl, Object v, boolean isSelected, boolean isFocused, int row, int col)
              //Store this info for later use
              this.tbl = tbl;
              this.row = row;
              this.col = col;
              this.isSelected = isSelected;
              //and then allow the usual component to be returned
              return super.getTableCellRendererComponent(tbl, v, isSelected, isFocused, row, col);
          * Set the contents of the cell to v
          * @param Object The value to apply to the cell
         protected void setValue(Object v)
              super.setValue(v); //Set the value as requested
              //Set colors dependant upon if the row is selected or not
              if (!this.isSelected) this.setBackground(new Color((float)0.87, (float)0.91, (float)1.0));
              else this.setBackground(new Color((float)0.75, (float)0.78, (float)0.85));
              //Set a special highlight color if this actual cell is focused
              if (this.row == this.tbl.getSelectedRow() && this.col == this.tbl.getSelectedColumn())
                   this.setBackground(new Color((float)0.5, (float)0.80, (float)0.6));
                   this.parentUI.model.setSelectedMonth(this.parentUI.getMonthDropdown().getSelectedIndex());
                   this.parentUI.model.setSelectedGridRow(this.row);
                   this.parentUI.model.setSelectedGridColumn(this.col);
    package org.w3style.calendar;
    import java.util.Calendar;
    import java.util.GregorianCalendar;
    import java.util.Date;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.*;
    public class CalendarModel
         protected GregorianCalendar calendar = null;
         protected Integer selectedMonth = null;
         protected Integer selectedYear = null;
         protected Integer selectedGridRow = null;
         protected Integer selectedGridColumn = null;
         String[][] days = null;
         public CalendarModel()
              this.days = new String[6][7];
              this.calendar = new GregorianCalendar();
         public GregorianCalendar getCalendar()
              return this.calendar;
         public String[] getMonths()
              String[] months = {
                   "January", "February", "March", "April", "May", "June",
                   "July", "August", "September", "October", "November", "December" };
              return months;
         public int getDaysInMonth()
              int[] daysInMonths = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
              int month = this.calendar.get(Calendar.MONTH);
              int ret = daysInMonths[month];
              if (month == 1 && this.calendar.isLeapYear(this.calendar.get(Calendar.YEAR))) ret += 1;
              return ret;
         public String[] getDayHeadings()
              String[] headings = { "S", "M", "T", "W", "T", "F", "S" };
              return headings;
         public DefaultTableModel getTableModel()
              String[] headings = this.getDayHeadings();
              Object[][] data = this.getDays();
              DefaultTableModel model = new DefaultTableModel(data, headings) {
                   public boolean isCellEditable(int row, int col)
                        return false;
              return model;
         public SpinnerDateModel getYearSpinnerModel()
              Date now = this.calendar.getTime();
              int year = this.calendar.get(Calendar.YEAR);
              this.calendar.add(Calendar.YEAR, -1000);
              Date earliest = this.calendar.getTime();
              this.calendar.add(Calendar.YEAR, 2000);
              Date latest = this.calendar.getTime();
              this.calendar.set(Calendar.YEAR, year);
              SpinnerDateModel model = new SpinnerDateModel(now, earliest, latest, Calendar.YEAR);
              return model;
         public void setSelectedGridRow(int r)
              this.selectedGridRow = r;
         public Integer getSelectedGridRow()
              return this.selectedGridRow;
         public void setSelectedGridColumn(int c)
              this.selectedGridColumn = c;
         public Integer getSelectedGridColumn()
              return this.selectedGridColumn;
         public int getSelectedMonth()
              return this.selectedMonth;
         public void setSelectedMonth(int m)
              this.selectedMonth = m;
         public String[][] getDays()
              int currDay = this.calendar.get(Calendar.DAY_OF_MONTH);
              this.calendar.set(Calendar.DAY_OF_MONTH, 1);
              int firstDayOfMonthAsDayOfWeek = this.calendar.get(Calendar.DAY_OF_WEEK);
              this.calendar.set(Calendar.DAY_OF_MONTH, currDay);
              int daysInMonth = this.getDaysInMonth();
              int row = 0;
              int key = 0;
              int dayToAdd = 0;
              for (int k = 1; k <= 42; k++)
                   if (k < firstDayOfMonthAsDayOfWeek || dayToAdd >= daysInMonth) this.days[row][key] = "";
                   else
                        dayToAdd++;
                        this.days[row][key] = ""+dayToAdd;
                        //Hack?
                        if (dayToAdd == currDay && this.getSelectedGridRow() == null && this.getSelectedGridColumn() == null)
                             this.setSelectedGridRow(row);
                             this.setSelectedGridColumn(key);
                   key++;
                   if (key == 7)
                        key = 0;
                        row++;
              return this.days;
         public int getCurrentMonth()
              int currentMonth = this.calendar.get(Calendar.MONTH);
              return currentMonth;
         public void setYear(int year)
         public void setMonth(int month)
    package org.w3style.calendar;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.util.Calendar;
    import java.util.GregorianCalendar;
    public class CalendarEventController
         protected CalendarPanel ui = null;
         protected CalendarModel model = null;
         public CalendarEventController()
         public void setUI(CalendarPanel cal)
              this.ui = cal;
         public void setModel(CalendarModel m)
              this.model = m;
         public void addMonthDropdown(JComboBox months)
              months.addItemListener(new ItemListener() {
                   public void itemStateChanged(ItemEvent e)
                        if (e.getStateChange() == ItemEvent.SELECTED)
                             int monthSelected = ui.monthDropdown.getSelectedIndex();
                             model.getCalendar().set(Calendar.DAY_OF_MONTH, 1);
                             model.getCalendar().set(Calendar.MONTH, monthSelected);
                             //update days in table model, update ui
                             ui.getGrid().setModel(model.getTableModel());
                             ui.configureTable();
                             ui.getGrid().updateUI();
    }I could have finished it but it was just going to be a buggy mess.

  • Unable to set default date for Date Picker item using Auto Row Processing

    Okay, I have searched through the forum for an answer, and have not found a thing to account for my problem.
    First, does anyone know if using Auto Row Processing has problems updating an item/field in a record where the Source is defined as Database Column if the 'Display As' is defined as 'Date Picker (MM/DD/YYYY)'?
    I ask this only because I found out the hard way that Auto Row Processing does NOT fetch the value for an item where the field is defined as TIMESTAMP in the database.
    My problem is as follows: I have a form that will CREATE a new record, allowing the user to select dates from Date Pickers, text from Select Lists, and entering in text into a Textarea item. The information is saved using a standard (created through the Auto Row Processing wizared) CREATE page level button. After the record is created the user is able to go into it and update the information. At that time, or later, they will click on one of two buttons, 'ACCEPT' or 'DECLINE'. These are Item level buttons, which set the REQUEST value to 'APPLY' (Accept) and 'UPDATE' (Decline). The Accept button executes a Process that changes the Status Code from 'Initiated' to 'Accepted', and sets the Declined_Accepted_Date to SYSDATE, then another Process SAVEs the record. The Declined button runs a Process that changes the Status Code from 'Initiated' to 'Declined', and sets the Declined_Accepted_Date to SYSDATE, then another Process SAVEs the record.
    However, even though the Status Code field is updated in the database record in both Accepted and Declined processing, the Declined_Accepted_Date field remains NULL in the database record (by looking at the records via SQL Developer). WHY??? I looked at the Session State values for both the Status Code and the Declined_Accepted_Date fields and saw that the fields (items) had the expected values after the process that SAVEs the record.
    The following is the code from the Accept button Page Process Source/Process:
    BEGIN
    :P205_STATUS_CD := 'A';
    :P205_REF_DECLINE_ACCEPT_DT := SYSDATE;
    END;
    As can be seen, the Status Code and Declined_Accepted_Date items are set one right after the other.
    As an aside, just what is the difference between Temporary Session State vs Permanent Session State? And what is the sequence of events to differentiate the two?

    Here's yet another thing that I just looked into, further information...
    One other difference between the date field I am having problems with (Accepted_Declined_Date), and other dates (with Date Pickers) in the record is that the Accepted_Declined_Date never gets displayed until after it is set with a default date when the Accept and Decline buttons are pressed.
    One of the other dates that works, the Received Date, is able to write a default date to the record that is never typed into the box or selected from the calendar. That date is placed into the box via a Post Calculation Computation in the Source, which I set up as: NVL(:P205_REF_RECEIVED_DT,TO_CHAR(SYSDATE,'MM/DD/YYYY'))
    However, I do remember actually trying this also with the Accepted_Declined_Date, and setting the Post Calculation Computation did not work for the Accept_Decline_Date. Could this be because the Accept_Decline_Date is never rendered until the Status Code is set to Declined (in other words, there is no need to display the date and allow the user to change it until the record is actually declined)???
    The control of the displaying (rendering) of the date is set via the Conditions / Condition Type: Value of Item in Expression 1 = Expression 2
    Expression 1 = P205_STATUS_CD and Expression 2 = L
    Does this shed any light???

  • Read only Text Field for a Date Picker?? (how to)

    Hi,
    We have BPM Object presentations where we need to accept date values and the presentation puts Date Picker by default. But the text box associated with the date picker is editable. Is there a way so that I can make it non-editable so that i can enforce the data entry via date picker only (a typical use case)?
    Thanks in advance,
    user8702013.

    Hi,
    In the BPM Object's Presentation editor for the presentation, click the date field. On the right, click the "Properties" tab. Change the field's "Editable" property for this presentation from the default ("Yes") to "No". This only effects this one presentation.
    Hope this helps,
    Dan

  • I WANT TO PICK UP RFQ DATE ( REQUEST FOR QUATATION )  ?

    I WANT TO PICK UP RFQ DATE ( REQUEST FOR QUATATION ) .
    please tell me how to find RFQ Creation date.
    i used RM06E-ANFDT .
    but RM06E is the structure .
    i want the table name from which i can find RFQ DATE .
    PLEASE HELP ME.

    Hi Sandeep,
    try vbak...
    Regards,
    Kaveri

  • "Date picker" in report - - View source shows no label for the date picker

    Hi
    In one of my reports, I am using multiple types (textarea/text/date picker/select list)
    I wanted to use a javascript based on the label, but I do not see "<label>" for Date picker in the view source due to which my Javascript fails.
    Snippet of view Source:
    <td class="t3data" ><label for="f08_0001" class="hideMe508">CATEGORY</label><textarea name="f08" rows="4" cols="16" wrap="VIRTUAL" id="f08_0001">EMPLOYEE INDUCTION</textarea></td>
    <td class="t3data" ><span class="lov"><input type="text" name="f11" size="15" maxlength="2000" value="29-FEB-08" style="padding-right:5px;" id="f11_0001" /><script type="text/javascript">
    As you can see above, we have a "label for" for the text area but not for the date picker
    Is there a reason for the same?
    Thanks
    Nitin

    Hi,
    OK - the headers attribute should also help as these will identify the correct cells. You would need to know the html tags used within each cell for each datatype.
    Would using cloneNode help you? It's a method of creating a copy of an entire row in a single instruction
    Andy

Maybe you are looking for

  • Error Importing a Transport in portal - Using custom role

    Hello Everyone, I have a custom role “XYZ” which has a few worksets copied (as delta links) from the standard System Administration Role. These worksets include Transport, Portal Display and Monitoring. Now, I have assigned a user “ABC” the following

  • Deploying exploded archives?

    Hi,           I am doing J2EE/Struts/EJB Development on Weblogic 8.1.           Have an EAR file with WAR file and bunch of EJB JARs inside that EAR.           I need to do a lot of changes and additions to the GUI,           which is mostly JSPs ins

  • Camera RAW and Nikon D800/CS6

    I upgraded to Photoshop CS6 from CS5.X and I can not open RAW files in Camera RAW for my Nikon D800.  It functioned properly in CS5 with the latest RAW release but won't work in CS6.

  • New with a hot spot

    I finally dropped the land line and went wireless with a JetPack 4G hot spot.  Up to now it is working great.  I do have the speed that I expected and connecting all my devices to it was very simple.  The only problem is that since I dropped the land

  • How do I install illustrator 9 on windows 7?

    Help, all i have is upgrade versions of Illustrator. Only full version is I9. Windows 7 is not allowing the install of I9.