Date pick calender error

Dear Experts,
We are using SAP B1-2007 PL 42 and occurred following error.
When I click the date picker in any form (window) [ex:-Sales Quotation, SO, etc....), it shows only 4 days of the week.
It hides rest of 3 days (Friday, Saturday, Sunday) in every month.
But I can manually enter or scroll from arrow keys.
Following is a screenshot of the error
http://www.4shared.com/photo/_2xzM9Sq/Date_Error.html
Would you please be able to assist us on this.

Check [CPRF] table.
Formid is '10000075' , Check width, VisInForm, ColId, UserSign fields.
Our sample is ,
select * from cprf  where formid = '10000075'  and usersign = 12
So, results will be seen below.
FormId                  ItemId                ColID               Width               VisInForm        VisualIndx ....
10000075     10000013     10000000     0     N     0     
10000075     10000013     10000001     0     N     7     
10000075     10000013     10000003     51     Y     3     
10000075     10000013     10000005     51     Y     2     
10000075     10000013     10000007     51     Y     1     
10000075     10000013     10000009     0     N     6
10000075     10000013     10000011     0     N     5     
10000075     10000013     10000013     16     Y     4     
Next, We executed following query.
UPDATE CPRF SET WIDTH = 22 , visinform = 'Y'
      where formid = '10000075'  and
                  colid in ( '10000007', '10000005', '10000003', '10000013', '10000011', '10000009','10000001' ) and
                   usersign = 12
And, SAP Client exit, re log-on.
Edited by: smm8ic on Jan 12, 2012 3:05 AM

Similar Messages

  • SSRS Date Picker Giving Error in IE

    I have some ASP.NET code that has an SSRS report control on page. The web application is hosted on a different server than where SSRS is hosted. The problem I'm having is when I pull up the report in
    Internet Explorer the date picker control is not showing the calendar and if I try to pull up the report in
    Chrome the date picker control doesn't show up at all. If I type dates into the text boxes, the report works just fine but, we would really like to be able to use the date picker control.
    Any ideas as to what could be wrong?

    Your title says IE but the post says Chrome.
    Take a look at this for Chrome:
    http://www.rajbandi.net/Fixing-SSRS-Report-Viewer-control-date-picker-in-Google-chrome/
    Andy Tauber
    Data Architect
    The Vancouver Clinic
    Website | LinkedIn

  • Is there to restrict dates avaiable in a  date picker field?

    I want to use a date picker field, but want to restrict the selectable dates. I am aware that I can perform a validation on the field after the fact, but is there a way to restrict the date visible to the end user in the date picker calender?

    Hi,
    As I know there is no way do that for Apex standard datepicker.
    You can check alternative solution e.g. using jQuery
    Br, Jari

  • Date picker's session state

    Hi,
    I have problems with date picker. There is a tabular form with several columns and one of them is Date. I have chosen a date picker instead of textfield so that user can choose a date easier. When user clicks Submit button, validation runs. My validation gives error message on Error Page. When user clicks 'OK' link on Error Page browser should go back to previous page without refreshing it so that there are still invalid values in form's fields entered by user before validation. But when I use Date picker the tabular form is being refreshed and all the input is lost. When I use textfield for Date column everything works fine - user clicks an 'OK' link on Error Page and he/she is taken to previous page where invalid data is still there in form.
    Is it possible to save a session state of a Date picker using Error Page? If not, is it possible to implement a mask for textfield in Date column so that when user writes the date he/she can see the format he/she should use?
    Regards,
    Tom

    Hi Phil,
    The problem is that it does not matter what the date format is set. The problem seems to be that date picker just exists in form! It seems that if there is a date picker in tabular form then the page always refreshes, it cannot be restored with javascript (history go -1).
    So is it possible to save date pickers session state or to solve this problem in any other way?
    Regards,
    Tom

  • Date Picker error

    Hi,
    We have an application that cannot use the date picker, after a date is selected, the error we get is:
    A runtime error has occurred
    Line:10
    Error: 'opener.document.forms.0.p_t03' is null or not an object
    After a lot of searching around, the developer has narrowed it down to something on the template for some reason, but we are not sure what. If we remove the template, it works fine - but in this case the business wants the standard look and feel - so we are stuck with having to use it.
    Below is the header, body and footer sections of the offending template - anyone have any idea of what could cause the problem with the date picker?
    Header:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>#TITLE#</title>
    #HEAD#
    <meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" />
    <meta name="description" content="Monash University Research Output Reporting Tool" />
    <meta name="keywords" content="research, RORT, reporting" />
    <link rel="stylesheet" href="http://assets.monash.edu.au/styles/monash.css" type="text/css" />
    <link rel="stylesheet" href="http://assets.monash.edu.au/styles/print.css" media="print" type="text/css" />
    <link rel="shortcut icon" href="http://www.monash.edu.au/favicon.ico" />
    <link rel="stylesheet" href="#IMAGE_PREFIX#css/einstein.css" type="text/css" />
    <script src="#IMAGE_PREFIX#javascript/functions.js" type="text/javascript"></script>
    </head>
    <div id="accessibility">
    Skip to content | Change text size
    </div>
    <div class="spacer"></div>
    <!-- S I T E I D E N T I F I C A T I O N -->
    <div id="global-header">
    <div id="global-images">
    <img id="logo" src="http://assets.monash.edu.au/images/logo.gif" width="343" height="79" alt="Monash University" /><img id="banner-image" src="http://assets.monash.edu.au/images/banner-research.jpg" width="288" height="79"
    alt=" " title="" />
    </div>
    <div class="spacer"></div>
    <!-- G L O B A L N A V I G A T I O N -->
    <table id="global-nav" summary="Layout for site-wide navigation">
    <tr><td>
    Monash home | About Monash | Faculties | Campuses | <a
    href="http://www.monash.edu.au/contact/">Contact Monash</a>
    </td></tr>
    </table>
    <!-- U T I L I T Y N A V I G A T I O N -->
    <table id="global-utils" summary="Layout for utility navigation">
    <tr>
    <td>
    Staff directory | A-Z index | Site map  
    </td>
    <td id="global-utils-form">
    <form action="http://ultraseek.its.monash.edu.au/query.html" method="get" name="seek1" id="seek1">
    <input type="hidden" name="rq" value="0" />
    <input type="hidden" name="col" value="m0" />
    <input type="hidden" name="qs" value="-monash.access:intranet -monash.access:emailarchive" />
    <label class="search" for="qt">SEARCH </label>
    <input type="text" id="qt" name="qt" size="20" maxlength="1024" />
    <input type="hidden" name="qp" value="" />
    <input name="submit" type="submit" accesskey="1" value="Go" />
    </form>
    </td>
    </tr>
    </table>
    <body #ONLOAD#>#FORM_OPEN#
    <H1><CENTER>MRGS EXAMINATIONS</CENTER></H1>
    Body:
    <!-- S K I P L I N K A N C H O R -->
    <a name="content" id="skiplink"></a>
    <div align="right">
    <table class="std">
    <tr><td align="left" width="10%" valign="bottom" nowrap="nowrap"><span class="PortletHeading2">&USER.</span></td><td style="padding-left:30px;">#NOTIFICATION_MESSAGE# #SUCCESS_MESSAGE#</td></tr></table>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="TabForegroundColor">
    <tr><td class="TabForegroundColor"><img src="#IMAGE_PREFIX#f_spacer.gif" border="0" height="3" alt="" /></td></tr>
    </table></div>
    </td>
    </tr>
    <tr>
    <td width="100%" colspan="3">
    <div class="th_content_body">
    #REGION_POSITION_01#
    <tr>
    <td style="padding-right:10px;padding-left:10px;" valign="top">#REGION_POSITION_02#
    </td>
    </tr>
    <table width="100%">
    <tr><br>
    <td width="25%" style="border-right:2px #000099 solid;padding-left:10px;" valign="top">#REGION_POSITION_03#
    </td>
    <td style="padding-right:10px;padding-left:10px;" valign="top">#REGION_POSITION_04#
    </td>
    <td valign="top" width="100%" style="padding-left:20px;padding-left:20px;">
    #BOX_BODY#</td>
    </tr>
    <tr>
    <td></td>
    <td style="border-style:solid;border-width:thin;border-color:black;padding-right:10px;padding-left:10px;" valign="top">#REGION_POSITION_07#
    </td>
    </tr>
    </table>
    </div>
    #REGION_POSITION_09#
    </td>
    </tr>
    <tr>
    </table>
    Footer:
    #FORM_CLOSE#
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="TabForegroundColor"><tr>
    <td class="TabForegroundColor"><img src="#IMAGE_PREFIX#f_spacer.gif" border="0" height="3" alt="" /></td></tr>
    </table>
    <table width="100%"><tr><td align="right" class="tiny"> #CUSTOMIZE# </td></tr></table>
    Copyright &copy; 2003 <FONT COLOR=#606060><U>Monash University</U></FONT> ABN 12 377 614 012 - <FONT COLOR=#606060><U>Caution</U></FONT> - <FONT COLOR=#606060><U>Privacy</U></FONT> - <FONT COLOR=#606060><U>CRICOS
    Provider Number: 00008C</U></FONT>
    Last updated: 10 August 2004 - Maintained by <FONT COLOR=#606060><U>[email protected]</U></FONT> - <FONT COLOR=#606060><U>Accessibility information</U></FONT>
    </body>
    </html>

    i think the calendar runs through a specific dll file. you may want to search to make sure all the dlls are installed. or re-install the software

  • UIX Javascript Error with Date Picker

    Hi all,
    I am using JDeveloper 10.1.2.1.0 with JHeadstart 10.1.2.2.32 to create UIX pages. I have a page with a filter by search field. If I select the date picker on this page in IE version 6 or 7, I get the following javascript error:
    Error: 'length' is null or not an object
    I have found this in the Common2_2_20.js, which is part of the jslibs
    function _accumulateNumber(
    a0,
    a1
    var a2=a0.currIndex;
    var a3=a2;
    var a4=a0.parseString;
    ***var a5=a4.length;***
    if(a5>a3+a1)
    a5=a3+a1;
    var a6=0;
    while(a3<a5)
    var a7=parseDigit(a4.charAt(a3));
    if(!isNaN(a7))
    a6*=10;
    a6+=a7;
    a3++;
    else
    break;
    if(a2!=a3)
    a0.currIndex=a3;
    return a6;
    else
    return(void 0);
    }With Firefox 1.5.0.4, I can get the date selector window to open, but when I select a date value, I get this javascript error:
    a0.select() is not a function
    I have found this in the Common2_2_20.js also. Here is the code where the error is occuring.
    function _dfsv(
    a0,
    a1
    if((a0==(void 0))||(a1==(void 0)))
    return;
    a1+=_getTimePortion(a0);
    var a2=new Date(a1);
    var a3=_getDateFieldFormat(a0);
    var a4=a0.value;
    var a1=a3.format(a2);
    if(a0.value!=a1)
    if(a0.onchange!=(void 0))
    if(_agent.isIE)
    a0.onpropertychange=function()
    var a5=window.event;
    if(a5.propertyName=='value')
    a0.onpropertychange=function(){};
    a0.onchange(a5);
    a0.value=a1;
    else
    a0.value=a1;
    var a5=new Object();
    a5.type='change';
    a5.target=a0;
    a0.onchange(a5);
    else
    a0.value=a1;
    ***a0.select();****
    a0.focus();
    }I am able to use the date picker on other pages and even different parts of this page. The date search field is of type dateField.and is part of a switcher. Does anyone have any ideas as to why this is occuring or how I can work around it? Thanks in advance. I really appreciate all of your help.
    Susan

    Thanks for the reply. As a matter of fact, in my case the error happens in a UIX page generated by JHeadstart. I did some JavaScript debugging using the FireBug Firefox entension and I found that it is some JHeadstart JavaScript that causes this problem.
    The JHeadstart JavaScript passes on an array of input elements to the AFD JavaScript function and the problem arises when the select() method is called on the array, rather than an input element in the array.
    I will try to solve my issue by modifying the JHeadstart JavaScript code. Please see the JHeadstart forum somewhere in the near future for my post(s) about this :-)
    Thanks, Wouter

  • Error on Page - when clicking the date picker

    Hi Gurus and Experts,
    I'm scheduling a report, when i click the date picker in the Report Parameter section, I got an Error on page (the date picker did not pop-out). What is the problem with this? My date parameter is working when not use for scheduling.
    Regards,
    JP
    Edited by: user10955574 on Nov 18, 2010 12:48 AM

    Hi
    I also encounter that error. The error says 'document.forms[...]' is null or not an object. It only occurs in the report parameters sections when scheduling a report. It works fine on viewing the reports and other that has date picker except from scheduling page.
    Please help.
    Thanks.

  • Odd Date Picker Error.

    I have a program that is going out into production, and on any of the date pickers, I'm getting the error:
    The requested URL /apex_030200.wwv_flow_utilities.show_as_popup_calendar was not found on this server
    Let me give two pieces of back story on this. The first part is that this program was developed in Apex 3.1.2 and the production server is running 3.2.
    The other piece of information is the format mask. I'm using the MM/DD/YYYY HH:MI format mask (which shows as valid in 3.2) and it is working without a problem in the original 3.1.2 version. When I changed the format mask to something that didn't include the HH:MI portion of the format mask, it worked fine. Just to make sure that the problem was just part of the migrated program, I created a dummy program that just used a date picker. I set it to MM/DD/YYYY and it worked correctly. I then changed it to the MM/DD/YYYY HH:MI format, and it gave the same error again.
    Is this just a rights issue inside of Oracle, or is there something blocking the time portion of the format mask itself? Any help will be greatly appreciated.
    Josh

    I created a new area on my current server that is using the 3.1.2 version of APEX and imported the code onto it and everything works again, but I still need to be able to get it working on the 3.2 version. Anyone know what might be causing the problems with the updated version, or how I can fix it? Thanks.
    Josh

  • Date Picker Error when not valid date

    I have a field with a date picker. I have an inline validation of type pl/sql error that checks to see that the user actually entered a valid date
    l_date := todate(:P1_MYDATE, '&PICK_DATE_FORMAT_MASK.');
    Works fine, except, next to the field (between the field and the date picker) I get this "junk"
    Unable to cast value "03/35/2004" to date format mask PICK_DATE_USING_FLOW_FORMAT_MASK
    This is pretty ugly, especially as I am already telling them they made a mistake.
    Would you like me to log a bug?
    Also . . . it would be great to have a built in validation for dates. Any thoughts there? Perhaps an enhancement request?
    Thanks,
    a-

    Anton,
    This is definitely pretty ugly and should be handled more gracefully. As it stands now, there is no way to suppress this automatic casting to a date value.
    You can work around it by clearing session state for that item if the validation fails. You could do this in a validation of type Function Returning Boolean with:
    declare
    l_date date;
    begin
    l_date := to_date(:P1_MYDATE,'&PICK_DATE_FORMAT_MASTK.');
    return true;
    exception
    when others then
    :P1_MYDATE := NULL;
    return false;
    end;
    The idea for a built-in validation for dates is a great one. HTML DB has all the information (what type of date picker, any format masks, NLS settings) to determine the validity of a date value.
    Joel

  • "Server Busy" error in Crystal Reports XI when using date picker

    Hi,
    I have come across an issue whereby I get a error pop up when using the date picker to select a date parameter as I run a report from within Crystal Report XI on a particular PC. While I am able to type in the date using the yyyy-mm-dd format, selecting the date picker displays an error message titled "Server Error" stating that the program is not responding and giving options "Switch To" and "Retry". Selecting either button displays the same error message and need to kill the application from the Task Manager to restart.
    I have run the same report from other PCs (including using the date picker to pick a date parameter) without the error popping up. All of the PCs have the same version of the application.
    Has anyone come across this and how were you able to resolve it?

    yes test is a formula that i used to calculate a difference
    that should work, but i would put () around the
    (if(remainder(({ztrptActVol.CPT}*{tlkpBblMileage.CPT}),1)>0 and
    remainder(({ztrptActVol.CPT}*{tlkpBblMileage.CPT}),1)<1) then
    truncate(({ztrptActVol.CPT}*{tlkpBblMileage.CPT}))+1
    else ({ztrptActVol.CPT}*{tlkpBblMileage.CPT})
    rounding in crystal is a pain in the &&

  • Tabular Form Read Only Date Picker

    Hello,
    I have two or three Items with date pickers and do not want to implement
    this code because it will be too many buttons on my form. I need to clear one item
    at a time when the datepicker is readonly but, in a tabular form.
    function f_clear_items()
        {$x('P1_ITEMA').value = ''};
        {$x('P1_ITEMB').value = ''};
        }Then once I create a url button and pass this function I can clear the datepicker's. But, I
    was wondering is there a cleaner way to this.
    I have other items on the page that are named the same but, in different tables. I only want
    to clear each date picker item at a time. This code works fine for a regular form.
    -Element Post Element Text for the Item to Clear
    a href="javascript:setValue('P1_ITEMA','');">Clear Date</aThere is a thread named 'How to clear a read only page Item...?' that states how this code works but, does not
    work for a tabular form in a Master Detail page. There is a link on side the Date Picker to clear item specified but, in a tabular form Item, there is no Element tab, any ideas on how to clear a readonly date picker item using a tabular form
    and not using a button for each item, thanks in advance. I am using Application Express 3.2.0.00.27.

    Dan,
    I totally understand your point of view. So, this tabular form aspect was not tested once the Clear Date link was discovered to clear a Read Only date field. Yes, using a button to clear a date is great but, I do not want to clear every date or specified item with the click of one button for this application. It is very useful but, not for my needs at the moment.
    Basically, if a date is selected and it needs to be cleared out you can just delete the value. But, if the date is readonly you can not clear/delete the date value unless you have the Clearing functionality for a particular item using the datepicker. It may not be worth the trouble Dan like you state by adding this extra code to the calender. If an invalid date is entered an error will appear anyway.
    Thanks alot Dan for expanding my mind and showing me some JQuery and providing me with this link to do some further research if needed, thanks again.

  • 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

  • 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

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

Maybe you are looking for

  • How can I insert furigana in Japanese script?

    How can I insert furigana (small phonetic characters above the line) in Japanese script? Thanks!

  • AT&T US Lumia 900 Tango update + new pink color

    My apologies if this was already reported: http://blogs.att.net/consumerblog/story/a7782923  New pink color available starting July 15th, Tango update "in the coming weeks". Thanks to Paul Thurrott for the tip: http://www.winsupersite.com/blog/supers

  • DV files 4:3 and 16:9

    On my hard disc I have many files that I downladed from DV cameras JVC, Sony and Panasonic, PAL. Some of them are in 4:3, and some in 16:9 format Anamorphic. How can I do a montage of 4:3 (Anamorphic) and 16:9 files in Final Cut Express, that is on m

  • DI API Deadlocks in SQL 2005 database server

    Hello All, I have an Issue, which is coming on large databases ( > 50GB) and number of users >  20. I have read the following notes 1269591, 1489753, 1318311, 1231444 , 1344641 , 1316554 also contributed in the following thread: Workaround: Each SAP

  • SD Controlling creation of pricing in VK11 by Condition Type

    Hiii SAPfans, i would like know, it is possible to control the users how maintain pricing by condition type ... example : User A can only maintain pricing for condition type = QPRT USer B can only maintain pricing for condition type = ZABC