Af:selectInputDate Date Picker Is 1 day off

I am currently using JDeveloper 10.1.3.5 and am running into a bug that I believe was supposed to be fixed in JDeveloper 10.1.3.3.
My application is designed using ADF BC and ADF Faces. Whenever selecting a date from the date picker, the date displayed in the textbox and stored in the DB is the previous day.
I read something about this issue being a bug with daylight savings time and that setting the time zone in the adf-faces-config.xml file can fix the problem. After setting the time zone, the date selected in the date picker and the date displayed in the textbox are the same, but the date stored in the DB is 1 day later.
Does anyone know what is going on and if there is a fix for this? Thanks for ANY help.

Hi,
Yes this is a correct way to fix the issue. One thing however, how did you set the timezone? For correct daylight saving handling, you'll have to use the long version, like America/New Yorw, NOT GMT-5 (for example).
regards,
~ Simon

Similar Messages

  • How to set the default value of an item type DATE PICKER to the day of yest

    Hi
    How to set the default value of an item type DATE PICKER to the day of yesterday ?
    Thank you very much !
    Christian.

    Hi Christian,
    Have a look at this thread Re: Default the Date Picker to Today
    It covers this issue in detail.
    Regards
    Paul

  • Date Picker Setting

    Hi All,
    i want to set the 5 day week in my date picker.
    so start day will be MONDAY and end day will be FRIDAY
    please guide me how to go for it.
    Thanks

    thank you for your prompt response.
    I'm not sure this will give me the results I need which is for the date/time to be automatically updated, triggered by a condition of another field, which is set manually by the user.
    for example, here is what the logic would look like:
    in progress is set on 01/10/2014 - when the user, selects in progress the date of 01/10/2014 is set automatically
    complete is set on 02/10/2014 - then, the completion date goes to 02/10/2014 and the in progress date is kept.
    should the user need to remove the status of complete in order to return to in progress - the date of completion is cleared (set to null), but the date stored for in progress does not change, as the clock should keep running from the initial 01/10/2014.
    the calculations from the data stored is a no brainer.  the challenge is ensuring the correct data is stored, and not set by a human (reporting accuracy).
    thank you for your time

  • Date picker,first day/last day of month

    Hi All
    i have two items on my page
    :p80_from_date
    :p80_last_date
    both of them are defined as date picker (dd/mm/yyyy)
    i want that the form_date will contain allways the first day of the month the the user is picking
    example suppose that the user picks in the :p80_from_date : '20/07/2009'
    then the date suppose to be '01/07/2009'
    if the user picking :p80_last_date '01/08/2009' the date suppose to be '31/08/2009' .
    i've tried to do it with computation with no success.
    i rather that after the user is picking the date he will see that the default is always the first date.
    how shall i do it ?
    thanks in advanced
    Naama

    Hello Naama,
    Now you are actually raising a new issue of date validation, which should pertains to every date field on your application.
    >> the problem is that the function is not returning Boolean
    It seems to me that you are mixing Computations and Validations. The first can set the value of an item; the second can raise an application error and include options of using a function that returns Boolean or an error text.
    The problem in your specific case is that you need to validate the date prior to using it in your Computation, however the APEX engine fires Computations before Validations. The solution might be to use a PL/SQL process with a firing point of “On Submit – Before Computations and Validations”.
    As I mentioned before, date validation should apply to all your application date items. Personally, I’m using a client side validation, fired by an onblur event, to give the user a “fair warning”. The following code matches your date format, and I’m using it in a Right-To-Left application (In the example it includes Hebrew error messages that can be changed to any text in any language you need). This function can deal with a fully formatted date string (e.g. 31/01/2010) or a string of numbers representing the date (e.g. 31012010).
    function dateValidation(pThis){
      var monthDays = [00,31,28,31,30,31,30,31,31,30,31,30,31];
      var date_len = pThis.value.length;
      if (date_len == 0){  // Date field is empty
        return true;       // or an error alert if date is mandatory
      if (date_len == 10) {
        pThis.value = pThis.value.substr(0,2)+pThis.value.substr(3,2)+pThis.value.substr(6,4);
      else {
        if (date_len != 8) {
          alert('DD/MM/YYYY התאריך חייב לכלול 8 ספרות במבנה');
          pThis.focus();
          return false;
      var DD = parseInt(trimLead0(pThis.value.substr(0,2)));
      if (DD < 1) {
        alert('מספר הימים אינו חוקי');
        pThis.focus();
        return false;
      var YYYY = parseInt(pThis.value.substr(4,4));
      if (YYYY < 1900 || YYYY > 2050){
         alert('טווח השנים המוכר 1900-2050');
         pThis.focus();
         return false;
      var MM = parseInt(trimLead0(pThis.value.substr(2,2)));
      // Checking for leap year if MM=02
      if (MM == 2) {
        var leap = (((YYYY % 4 == 0) && ( (!(YYYY % 100 == 0)) || (YYYY % 400 == 0))) ?1:0);
        if ((leap && DD > 29) || (!leap && DD > 28)) {
          alert('מספר הימים בפברואר אינו חוקי');
          pThis.focus();
          return false;
      else {
        if (DD > monthDays[MM]) {
          alert('מספר הימים בחודש זה אינו חוקי');
          pThis.focus();
          return false;
      if (DD < 10) { DD = '0'+DD; }
      if (MM < 10) { MM = '0'+MM; }
      pThis.value = DD+'/'+MM+'/'+YYYY;
      return true;
    function trimLead0(str) {
       return str.replace(/^0*/g,"");
    }Best Practice stipulates that client side validation is not enough and you should use server side validations. In your specific case, if an end user tricked the client side validation he/she deserves to receive a system error message. Still, if you want to prevent it, you need to add some PL/SQL code that validates the input date before you use it in your Computation.
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Author of Oracle Application Express 3.2 – The Essentials and More

  • Problem with Date Picker and wwv_flow_item.date_popup()

    I have a Report based on the HTMLDB How-To “Build Tabular Forms for Multi-Row Operations”
    This is my code:
    select
    X.RRIT_UID,
    X.DOS,
    X.CPT_CODE,
    X.MOD,
    X.DX_CODE,
    X.CHARGES,
    X.UNITS
    from
    (select
    htmldb_item.text(1,RRIT_UID) RRIT_UID,
    wwv_flow_item.date_popup(2,null,RRIT_DATE_OF_SERVICE) DOS,
    htmldb_item.text(4,RRIT_SUBMIT_SERVICE_CODE,6) CPT_CODE,
    htmldb_item.text(5,RRIT_SUBMIT_MODIFIER,3) MOD,
    htmldb_item.text(6,RRIT_ATT_DIAG_CODE,6) DX_CODE,
    htmldb_item.text(7,RRIT_BILLED_CHARGES,9) CHARGES,
    htmldb_item.text(8,RRIT_UNITS,3) UNITS
    from
    RRIT_REPRICE_ITEM
    where
    RRRR_UID = :P5_RRRR_UID
    union all
    select
    htmldb_item.text(1,null) RRIT_UID,
    wwv_flow_item.date_popup(2,null,null) DOS,
    htmldb_item.text(4,null,6) CPT_CODE,
    htmldb_item.text(5,null,3) MOD,
    htmldb_item.text(6,null,6) DX_CODE,
    htmldb_item.text(7,null,9) CHARGES,
    htmldb_item.text(8,null,3) UNITS
    from
    dual)
    X
    My problem is when I run the page and select a date from the Pop-Up calendar I get this error:
    Line 10
    Error: ‘opener.document.forms.0.f02.0’ is null or not an object
    I know it is something to do with data formats and the fact that I do not fully understand the use of wwv_flow_item.date_popup().

    Hi DK,
    It is a WD Java application, Backend is ABAP (MM module).
    The UI is input field, where the context attribute type is Date, So its been changed to Date Picker.
    The problem is when the user runs the WD application in Portal, The calendar format is being changed for some users. That is for few users the Week starts with Monday and for few users the week starts with Sunday.
    I need all the users to have Monday as the First day of the week.
    Please let me know, what will be solution for this.
    Since I haven't done anything in regard to date, it is a simple Date format.
    Thanks & Regards,
    Palani

  • Problem with Date Picker Item

    Hello,
    I'm using APEX 4.2.2.00.11 and I have a problem with the Date Picker. I can't select any day of the second week of the month (it happens for all months).
    Someone know if there are any reason (and how can I solve it) or is an APEX bug?
    Thank you!

    Hi Chimanzee,
    try for : source value
    to_char(sysdate-7,'DD/MM/RRRR')
    hope this helps.
    Leo

  • Date picker not working correctly.

    Hi all,
    I have a strange prob in webdynpro.
    I am using Date picker. But once i read it, the value is one day less than that i give.
    For eg, i give <b>06/25/2006</b>.. but it reads as <b>06/24/2006</b>.
    Please help.
    Thanks in advance
    gEorgE

    Open an OSS message (BC-WD-JAV-RUN).
    Armin

  • Date Picker Doesn't Like Retrieved or Typed In Date Values

    I have more than one Region on a page, so I retrieve the column values for a region this way:
    (On LOad, Before Header, Once per Page Visit)
    BEGIN
    EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_DATE_FORMAT='''||:pick_date_format_mask||'''';
    FOR request_rec IN (SELECT dev_requested_ind,
    dev_requested_dttm,
    dev_analyst_seq,
    dev_completed_ind,
    dev_completed_dttm,
    dev_dba_seq,
    sit_requested_ind,
    sit_requested_dttm,
    sit_analyst_seq,
    sit_completed_ind,
    sit_completed_dttm,
    sit_dba_seq,
    uat_requested_ind,
    uat_requested_dttm,
    uat_analyst_seq,
    uat_completed_ind,
    uat_completed_dttm,
    uat_dba_seq,
    prd_requested_ind,
    prd_requested_dttm,
    prd_analyst_seq,
    prd_completed_ind,
    prd_completed_dttm
    FROM request_tbl
    WHERE request_seq = :p16_request_seq)
    LOOP
    :p16_dev_requested_ind := request_rec.dev_requested_ind;
    :p16_dev_requested_dttm := request_rec.dev_requested_dttm;
    :p16_dev_analyst_seq := request_rec.dev_analyst_seq;
    :p16_dev_completed_ind := request_rec.dev_completed_ind;
    :p16_dev_completed_dttm := request_rec.dev_completed_dttm;
    :p16_dev_dba_seq := request_rec.dev_dba_seq;
    :p16_sit_requested_ind := request_rec.sit_requested_ind;
    :p16_sit_requested_dttm := request_rec.sit_requested_dttm;
    :p16_sit_analyst_seq := request_rec.sit_analyst_seq;
    :p16_sit_completed_ind := request_rec.sit_completed_ind;
    :p16_sit_completed_dttm := request_rec.sit_completed_dttm;
    :p16_sit_dba_seq := request_rec.sit_dba_seq;
    :p16_uat_requested_ind := request_rec.uat_requested_ind;
    :p16_uat_requested_dttm := request_rec.uat_requested_dttm;
    :p16_uat_analyst_seq := request_rec.uat_analyst_seq;
    :p16_uat_completed_ind := request_rec.uat_completed_ind;
    :p16_uat_completed_dttm := request_rec.uat_completed_dttm;
    :p16_uat_dba_seq := request_rec.uat_dba_seq;
    :p16_prd_requested_ind := request_rec.prd_requested_ind;
    :p16_prd_requested_dttm := request_rec.prd_requested_dttm;
    :p16_prd_analyst_seq := request_rec.prd_analyst_seq;
    :p16_prd_completed_ind := request_rec.prd_completed_ind;
    :p16_prd_completed_dttm := request_rec.prd_completed_dttm;
    END LOOP;
    END;
    p16_dev_requested_dttm is defined as a Date Picker (use application format mask)
    The data source is a Date column called dev_requested_dttm. I haven't defined a format mask for it. (I have tried using &PICK_DATE_FORMAT_MASK..)
    The Application Format Mask is defined as a Subsitution String called
    PICK_DATE_FORMAT_MASK
    with a value of
    MM/DD/YYYY HH:MI AM
    The retrieved column value for p16_dev_requested_dttm looks fine, but when I click the date picker pushbutton, I get this message:
    Not Found
    The requested URL /pls/htmldb/wwv_flow_utilities.show_as_popup_calendar was not found on this server.
    Oracle-Application-Server-10g/10.1.2.0.0 Oracle-HTTP-Server Server at edwdev.dhhs.state.nh.us Port 7779
    I also get a line in my log file,
    /vg02lvol1/app/oracle/product/htmldb/Apache/Apache/logs/error_log.1133956800:
    [Wed Dec  7 16:23:43 2005] [error] [client 172.16.252.76] [ecid: 1133990623:172.17.96.35:1802:0:9870,0] mod_plsql: /pls/htmldb/wwv_flow_util
    ities.show_as_popup_calendar HTTP-404 ORA-01849: hour must be between 1 and 12\nORA-06512: at "FLOWS_020000.WWV_FLOW_UTILITIES", line 1801\n
    ORA-06512: at line 22\n
    This happens with both FireFox and Internet Explorer.
    Any ideas what's causing this?
    -F
    Message was edited by:
    Fred C Willingham

    Fred,
    Unfortunately, the answer is no to both of your questions.
    There is no way for you as a developer to control which date is highlighted in the popup calendar. It will always highlight the current day (if you're displaying a month that contains the current day). This is an interesting and prudent suggestion, and one which we'll consider for an upcoming release of HTML DB.
    With regards to your second point, that also is something we should consider for an upcoming release of HTML DB. This isn't impossible for us to do, it was just designed to work in the current fashion. If you look at the generated HTML for the Date Picker item on the page (not the popup calendar itself, but the page on which the item is rendered), we break out each element of the date value into discrete components. When we instead rely upon the user entered value, garbage or date values not conforming to the date format mask are easily entered. And the question is - what to do then? Raise an error immediately, still popup the calendar and show the current month, etc. So we've tried to be fairly strict about the date values and format masks for the popup calendar, hence the implementation you see.
    Thanks again for your comments.
    Joel

  • In iCal, "Available Meeting Times" greys out working hours one day off, MS Exchange

    I am using iCal, accessing an MS Exchange server. When setting up a meeting, "Available Meeting Times" greys out the non-working hours of potential meeting participants. However, the days are one day off. E.g. the working hours of my collegues are displayed are Tuesday-Sunday instead of Monday-Friday. The dates and times of meetings are relayed correctly. Only the display of the working hours seems to be off.
    Needless to say that my collegues are using Windows Outlook, and everything works there.

    I still have the same issue. Had it ever since at least 2010 and meanwhile we switched Exchange-Servers and I'm on Mavericks, but still. Looks to me as if iCal requests something like "getWorkDays" from teh Server. The Server probably replies [2,3,4,5,6]. When the week starts on Sunday, this is perfectly fine. But if the Week starts on Monday, this will give you Tue-Sat as available Days. So it might be a bug in either Exchange or iCal to treat that information correctly, but I'm not obv. not sure about that.

  • ICal All Day Events One Day Off

    Once again, I am unable to use my Calendar... This time because any All Day event, subscribed or synced from gmail, are one day off. Seems like a problem that has been around for some time but I just ran into on an update to iOS-5. Any ideas? Switching the dates on all of my other calenders to fit the iPhone problem is not an option.
    Also, no fix on 5.0.1

    I just upgraded from Blackberry to iPhone 5. Have Outlook on work computer, and Enterprise server. I also have calendar issues, with all my all-day events showing up one day early. I have years of data, so I can't go back and change it all manually. Have tried turning Time Zone Support on and off, with no change. The manually set zone is correct. Any help would be appreciated.

  • 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.

  • How to insert a date picker input text field in a JSF Jsp page

    Hi,
    I have to develop an application using generic facets, unfortunately I am not supposed to use ADF Faces components given by Oracle.
    Now my requirement is, on JSP page an input text field which holds a DATE value is required, it should also have a Date Picker Calendar adjacent to it.
    Could you pls shed some light on this issue and help me out.
    Thanks
    ~Siva(ji)

    <HTML>
    <script language="JavaScript" type="text/javascript">
    <!--
    var pUpWidthc = 300; //Change the pUpWidthc to your requirements.
    var scrAvailc = 400;     //Change to your available screen width. You see in
    //this eBooks' middle frame, the frame width is
                                                                //equal to 410 . So whether your using frames or
                                                                //or a full 800 pixel screen, you must calculate
                                                                //your available screen width.
    var PopUpC = document.getElementById("pUpc");
    document.write('<div id="pUpc" style="visibility:hidden;z-index:4;width:'+pUpWidthc+';position:absolute;"></div>');
    function cstmPup(objC,c){
    popUpC = document.getElementById("pUpc");
    popUpC.innerHTML = c.innerHTML
    popUpC.style.left = getPos(objC,"Left");
    var scrNeedc = getPos(objC,"Left") + pUpWidthc;
    if (scrNeedc > scrAvailc){
    //The number 10 below is an extra offset x value applied when the
    //definitional popup box positions beyond your screen width. You
    //can change this number to fine tune your "beyond screenwidth" positioning.
    var scrOffsetC = getPos(objC,"Left") + pUpWidthc - (scrAvailc);
    popUpC.style.left = getPos(objC,"Left") - (scrOffsetC - 0);
    popUpC.style.top = getPos(objC,"Top") + objC.offsetHeight;
    popUpC.style.visibility = 'visible';
    fill();
    function fill()
         var noOfRows=7,noOfCols=7,i=0,j=0,day=1,x;
    var d1=FirstDayOfWeek(7,2008);
    //40     
         for(i=1;i<noOfRows;i++)
              x=document.getElementById('myTable').insertRow(i);
              for(j=0;j<noOfCols;j++)
                   var y=x.insertCell(j);
                   if( ( i==1 && j<d1))
                   y.innerHTML="";
                   else if(day<=DaysInMonth(7,2008)){
                   y.innerHTML=day;
                   day++;
    //document.write(FirstDayOfWeek(7,2008));
    function FirstDayOfWeek(m,y)
    var i;
    var dow = 6;
    //document.write("Hello");
    for (i=1583; i<y; i++)
    dow += (LeapYear(i)) ? 2 : 1;
    for (i=1; i<m; i++)
    dow += DaysInMonth(i,y);
    return dow % 7;
    function DaysInMonth(m,y)
    // m is the month number (1,2,3,...12), y is the year number (four digits)
    switch (m)
    case 1:
    case 3:
    case 5:
    case 7:
    case 8:
    case 10:
    case 12: return 31;
    case 2: if (LeapYear(y))
    return 29;
    else
    return 28;
    default: return 30;
    function LeapYear(y)
    return (y % 4==0) && ((y % 100!=0) || (y % 400==0));
    function getPos(objC,sPos){
    var iPos = 0;
    while (objC != null) {
    iPos += objC["offset" + sPos];
    objC = objC.offsetParent;}
    return iPos;
    function hPopUpc(){
    popUpC = document.getElementById("pUpc");
    popUpC.style.visibility = 'hidden';
    //-->
    </script>
    <BODY
    <button id="c1" onclick="cstmPup(c1,pUpCstm)">Custom PopUp</button>
    <'div' id="pUpCstm" style="display:none;">
    <'div' id="myid" align="left" style=" width:100%; height:100%; background:#cccccb; border:1px solid black; border-top:1px solid white; border-left:1px solid white; padding:10px; font:normal 10pt tahoma; padding-left:18px "> <b>Rich Message Boxes</b>
    <hr size="1" style="border:1px solid black;">
         <div style="width:220px; font-family:tahoma; font-size:80%; line-height:1.5em"><br>
              <table border ="1" id="myTable">
                   <TR>
                        <TD> SUN </TD>
                        <TD> MON </TD>
                        <TD> TUE </TD>
                        <TD> WED </TD>
                        <TD> THU </TD>
                        <TD> FRI </TD>
                        <TD> SAT </TD>
                   </TR>
              </table>
         <br><br>
         </div>
         <br>
         <div>
    <button tabindex="-1" onclick="hPopUpc()" style="border:1px solid black; border-left:1px solid white; border-top:1px solid white; background:#cccccc ">Close Message</button>
    </div>
    <?BODY
    </HTML>
    Message was edited by:
    mchepuri
    Message was edited by:
    mchepuri
    Message was edited by:
    mchepuri

  • ADF Swing 11g - How to bind date picker

    Hello,
    My Swing application needs to use date picker control, and I decided to use JCalendar from www.toedter.com.
    Is there any example on binding such Swing component? Or are there other date picker control that can easily integrate into JDev and ADF for that matter?
    Thanks
    Regards,
    Rudi

    Mmm well i don't know if this can help you
    I am using a date picker too, this is the code where I use it
    <af:selectInputDate label="#{bundle[\'newPatient.birthday\']}"
                                          required="true"
                                          requiredMessageDetail="#{bundle[\'newPatient.validate.birthday\']}"
                                          binding="#{PatientCreateBean.birthday}"/>My binding property is PatientCreateBean.birthday
    and birthday is type CoreSelectInputDate
    I got info about the different elements to use in ADF from the following link
    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/tagdoc/core/imageIndex.html
    I hope this can help you

  • Using Date Picker on form causes session values to be cleared on validation

    Got a really weird problem on a form (on a report). We have a basic form which has a date picker on. The form fires a number of bog standard validations when the Create button is clicked (values filled in, values are numbers etc).
    When a validation fails, the values inputted by the user are retained. So far so good. However, when the user selects a date, and a validation fails, all the session values are all cleared (not just the date picker) and they have to fill everything in again.
    At first we thought there must be a process resetting the page items - nothing. Also recreated the page from scratch and it still doesn't work. Strangely, the problem goes away if we change the date picker to a text field. Also, if the user doesn't select a date, the other session values are retained.
    Are we doing something daft here or is this a bug?

    Yes - we're using inbuilt validation to ensure it's a valid date. We tried turning this off and it makes no difference, the problem is still there.
    We tried changing the date picker to a text field and using the same validation (i.e. check it's a date) and this works fine. This is why we think it might be a bug.

  • Populate select list when a date selected from date picker in tabular form

    Hi Guys,
    I have a situation where user picks a date from a date picker in tabular form.
    So as soon as he picks a date say 05/31/2011 from the date picker I want to populate a select list with 2 values : Tuesday AM , Tuesday PM.
    I have gone through the forums a lot and figured we can write a Dynamic Action using JQuery Selector. But I am not sure how to figure out the day from a date picker.
    I appreciate if some one can give your thoughts on how to proceed. It seems to be simple but looks like a tricky one. I am not familiar with writing Java Script.
    Thanks ,
    Raj

    I was thinking your date selected from CALENDAR ended in a list_item.
    I don't know I thinking that
    well,
    :master_block.itemdate is your text_item where calendar return date selected.
    and then , following Gerd's step
    Create a WHEN-MOUSE-DOUBLECLICK on the date-item of CALENDAR and write :
    begin
    :master_block.itemdate := calendar (.........);
    go_block ('master-block');
    execute_query;
    end;
    or set a global or parameter variable date selected from calendar :parameter. xxxxxx
    in a PRE-QUERY
    :master_block.itemdate := :parameter. xxxxxx
    and
    Create a WHEN-MOUSE-DOUBLECLICK on the date-item of CALENDAR and write :
    begin
    :parameter. xxxxxx := calendar( ....);
    go_block ('master-block');
    execute_query;
    end;
    regards

Maybe you are looking for

  • How do I change a component in an existing design?

    I have an existing design created in V11.0 Multisim/Ultiboard. I want to change a single component to replace a transistor in a D2PAK to a part in a DPAK. I edited the component in my users library to use the DPAK footprint. I transferred (Transfer t

  • CS4 Bridge not interfacing with Photoshop.

    I am evaluating the new Photoshop CS4 (it is purchased copy and not running on the 30 day trial) and have run into a problem in using Bridge CS4. I am able to open an image using Photoshop's File Open command BUT when I attempt to do so in Bridge I g

  • Movies in iWeb

    Is it possible to link to and play movies created on a PC within iWeb. Can hyperlink be used for this?? Currently the movies are on a flash drive. Thank you.

  • FM for Material charateristric modify

    Hi,   Is there any function module to modify the material master charateristic. Please let me know the procedure and sample code.

  • Accurate scaling of anatomical data

    I am using AI to import anatomical tracing data (paths and symbols). The data coordinates are in millimeters.  I create an artboard as follows: The file import code reads the data and then passes the bounds data to the art routine, CreateDataArt, as