HTMLDB_ITEM.DATE_POPUP API

hi!! I have a report (sql query type Region) and one of the columns is generated
dynamically through HTMLDB_ITEM.DATE_POPUP API. One of the parameters of this function
is the ROW, so I had to pass to this function as the row parameter the ROWNUM, like
this: select (15,rownum,t.call_back_later_date,'dd-mon-yyyy',6,20) from .....
It worked ok when I have more than one record, but when I have only one record it doesn't work, I mean I select
the date form the calendar and it's not returned on the corresponding column. Is this a bug when we have one
record?
Thanks!

Daniela,
I'm assuming this is in Internet Explorer? This was a bug that has been corrected in HTML DB 1.6.
Joel

Similar Messages

  • HTMLDB_ITEM.date_popup on single row report does not work

    Dear HTML DB Team,
    On a report wit a single( one ) row the "HTMLDB_ITEM.date_popup" does not fill the selected date to the cell. (Same for wwv_flow_item.date_popup)
    On the same report with 2 or more rows HTMLDB_ITEM.date_popup works fine.
    Any suggestions?
    Erik
    testcase:
    create region:
    select htmldb_item.hidden(1,empno) empno,
    ename,
    htmldb_item.select_list_from_query(3,job,'select distinct job, job from emp') job,
    htmldb_item.popupkey_from_query(4,mgr,'select ename, empno from emp',10) mgr,
    wwv_flow_item.date_popup(6,null,hiredate) hiredate,
    htmldb_item.text(7,sal,10) sal,
    htmldb_item.text(8,comm,10) comm,
    htmldb_item.select_list_from_query(9,deptno,'select dname, deptno from dept') deptno
    from emp
    delete 13 rows from emp ( 1 row left ):
    delete from emp
    where ename <> 'KING';
    => date_pop does not work

    Using the htmldb_item API vs. built-in multi-row update functionality:
    I can't speak to the question about the date for the next HTML DB release. But I'd like to add a few comments to this discussion regarding the use of the htmldb_item API package. It is generally advisable to use the built-in multi-row update functionality instead of htmldb_item function calls when implementing tabular forms. While I do acknowledge that some display types such as date popups are not yet available, I would nevertheless recommend working with what's available on the report column attributes page (i.e. using a text field for the date columns) as opposed to using htmldb_item functions whenever possible. Please keep in mind though that they are mutually exclusive, so they can't be combined on the same report.
    The reasons for my recommendation are simple: first of all, if you use htmldb_item calls as part of your SQL statement, the HTML form elements are rendered for all rows in your result set. The built-in types on the other hand only render HTML form elements for those rows shown on your current page, thus you get better performance. Secondly, htmldb_item calls make your SQL statement quite complicated, not only has the engine to jump back and forth between executing your SQL and calling the PL/SQL functions, you also need to take extra care implementing your PL/SQL processes according to the item IDs you assigned in your htmldb_item function calls. When working with e.g. popup LOVs, this gets even more complicated because that type actually results into two html form elements for each column (one storing the hidden ID, one storing the display value). And lastly, by using the multi-row update functionality, you would get lost update detection automatically built. That means, that you can't accidentally overwrite another person's changes in the event that you should both be working on the same data. Implementing this kind of functionality with your htmldb_item based tabular forms would take a lot more effort than simply go with what's already provided.
    So please carefully weigh the benefits of additional display types that you'll get by using the htmldb_item API against all the functionality you'll get by using the built-in tabular form and multi-row update features.
    Regards,
    Marc

  • Htmldb_item.date_popup and sort options in reports

    I use the htmldb_item.date_popup in a report (PLSQL returning SQL). Everything works fine unless I provide the option to sort columns. If I allow a column to be sorted, the date_popup does not return the date to the corresponding field but to another field of the same column. However, the users want to be able to sort the report due to several columns. Can anyone provide a work-around?
    The query is as follows:
    DECLARE
    statement VARCHAR2(32767);
    BEGIN
    statement := '
    select
    htmldb_item.checkbox(47, ID, ''onClick="javascript:doSubmit()"'', :P3_FREISTELLUNG_SELECTED, '':'') as CHECKBOX,
    htmldb_item.hidden(11,ID)||
    htmldb_item.hidden(12,ID_VERTRAG)||
    htmldb_item.date_popup(13,null,VON,''DD.MM.YYYY'',13,10) as BEGINN,
    htmldb_item.date_popup(14,null,BIS,''DD.MM.YYYY'',13,10) as ENDE,
    htmldb_item.date_popup(15,null,ERTEILT,''DD.MM.YYYY'',13,10) as ERTEILT,
    htmldb_item.select_list_from_lov(16,decode(FLAG_CANCELED,null,0,FLAG_CANCELED),''LOV_FREISTELLUNG_NULL'',null,''NO'') as FLAG_CANCELED,
    decode(FLAG_DELETED,1,''direkt gelöscht'',2,''indirekt gelöscht'',''aktiv'') as WERT_DELETED,
    htmldb_item.text(17,BEMERKUNG,20,4000) as BEMERKUNG
    from VERTRAG_FREISTELLUNG where ID_VERTRAG = :P3_KOPF_ID';
    if :P3_FREISTELLUNG_NEU = 2 then
    statement := statement||'
    union all
    select
    null as CHECKBOX,
    htmldb_item.hidden(11,null)||
    htmldb_item.hidden(12,null)||
    htmldb_item.date_popup(13,null,null,''DD.MM.YYYY'',13,10) as BEGINN,
    htmldb_item.date_popup(14,null,null,''DD.MM.YYYY'',13,10) as ENDE,
    htmldb_item.date_popup(15,null,null,''DD.MM.YYYY'',13,10) as ERTEILT,
    null as FLAG_CANCELED,
    null as WERT_DELETED,
    htmldb_item.text(17,null,20,4000) as BEMERKUNG
    from dual';
    end if;
    RETURN statement;
    END;
    PS: I know that the problem already has been discussed in the forum, but I did not find a solution for the problem.

    I have this issue as well with popup_from_query compunded with sorting.
    Wondering if there is any workaround from anyone ?

  • Htmldb_item date_popup populating wrong row

    Hi guys, I've noticed a few similar threads previously posted on the forums about this issue, unfortunately mines occurring in APEX 2.2.
    When I try to populate a date pop_up field it populates the wrong field. I want to be able to order my report results A-Z based on project names but using an order by at the end of the query then causes the population error to occur. I've spent a while beating my brain against this yet to no avail, was wondering if anyone could give me a hand.
    Code:
    select
    pr.proj_name,
    HTMLDB_ITEM.DATE_POPUP(4,rownum,
    pr.planned_imp_date, 'DD-MON-YYYY HH24:MI', 20, NULL) PLANNED_IMP_DATE,
    pr.STATUS
    from projects pr
    where pr.proj_id = :p9_project_id
    order by pr.proj_name;
    Thanks,
    Ruari

    Have had a hack away at it and came up with the following, all works fine for me so I hope it's useful for someone else.
    select x.proj_name
    , x.status
    , HTMLDB_ITEM.DATE_POPUP(4,rownum,x.planned_imp_date, 'DD-MON-YYYY HH24:MI', 20, NULL, x.proj_name) PLANNED_IMP_DATE
    FROM (select pr.proj_name proj_name,
    pr.STATUS status
    ,pr.planned_imp_date planned_imp_date
    from projects pr
    where pr.project_id = :p9_project_id
    order by pr.proj_name) x
    Edited by: Ruari on Oct 6, 2008 10:49 AM

  • Htmldb_item.date_popup not functioning correctly since 3.1 upgrade

    If I pick a date from the 6th row (for example) in the table, it is putting the date in the 1st row. The upgrade has broken production code. What can I do to workaround it? Thank you.
    Here is my query:
    select gl_rpt_item_id, description, act_flag, htmldb_item.hidden(1, gl_rpt_item_id) as item_id,
    htmldb_item.date_popup(6,rownum, decode(client.get_gl_date(:f102_client_centric_id, gl_rpt_item_id),'NULL','',to_char(client.get_gl_date(:f102_client_centric_id, gl_rpt_item_id))),'DD-MON-YYYY',11,11,decode(act_flag,'I','"DISABLED"'))
    new_gl_dt
    from gl_rpt_item where is_clinical = 'Y' and act_flag <> 'I'

    Hello,
    We are working for a generic fix for the patch set, but you can fix this right now by adding an id parameter to your call to htmldb_item.date_popup / APEX_ITEM.DATE_POPUP
    Though it's not in the documentation , an oversight that will be fixed, you can generate an id that overrides the APEX generated id. It is the next parameter after the attributes parameter.
    So you immediate fix is to change your query like this,
    select gl_rpt_item_id, description, act_flag, htmldb_item.hidden(1, gl_rpt_item_id) as item_id,
    htmldb_item.date_popup(6,rownum,date_value,'DD-MON-YYYY',11,11,decode(act_flag,'I','"DISABLED"'),'datepicker_'||rownum)
    new_gl_dt
    from gl_rpt_item where is_clinical = 'Y' and act_flag <> 'I' Notice the call to the popup has 'datepicker_'||rownum added, this will set id for the date picker and it will now be set to datepicker_1 , datepicker_2 and so forth
    Regards,
    Carl
    I took the decode out so you could see the id change easier.

  • Htmldb_item.DATE_POPUP for a date and minute combination

    Hi All,
    I'm new to apex and I'm having an issue getting the below to work.
    I have this sql which is used to produce a report,
    select
    HTMLDB_ITEM.HIDDEN(1, MV_ID) ||
    htmldb_item.checkbox(2,rownum) "Bulk Update",
    HTMLDB_ITEM.text(3, CI_NAME) "CI Name",
    htmldb_item.DATE_POPUP(4, rownum,to_date(to_char(WINDOW_START,'DD-Mon-YYYY HH24:MI'),'DD-Mon-YYYY HH24:MI')) "Window Start" ,
    htmldb_item.DATE_POPUP(5, rownum, to_date(to_char(WINDOW_END,'DD-Mon-YYYY HH24:MI'),'DD-Mon-YYYY HH24:MI')) "Window End",
    HTMLDB_ITEM.text(6,AUDIT_CHANGE_NO) "Change No", AUDIT_UID,
    to_char(AUDIT_TSTAMP,'DD-Mon-YYYY HH24:MI:SS') AUDIT_STAMP
    from MY_SCHEMA.MAIN_Window;
    The problem is the htmldb_item.DATE_POPUP( command will not allow for minutes and seconds to be modified or even displayed (the date is displayed).
    I have changed the Column Formatting - Number / Date Format to DD-MON-YYYY HH24:MI:SS and it still wont display the time.
    Any assistance would be appreciated.
    Cheers
    Brett

    Hi All,
    Seems it was me overcomplicating things,
    Its working now after I removed the "to_date" and "to_char"
    Cheers

  • Htmldb_item.date_popup

    I can't believe we are the first to use a calendar control in a tree? We have this coded in development but it only works if we have one calendar shown. Any more than one and the calendar is shown but does not return to the correct calendar entry. One worry is that the 2nd parameter for the ID of the control appears to be deprecated which implies it can not be used within array processing?
    Sorry, but this is for a client with APEX v2. We may push to three LOVs for the date if we can not do it with a calendar control.
    Phil

    I can't believe we are the first to use a calendar control in a tree? We have this coded in development but it only works if we have one calendar shown. Any more than one and the calendar is shown but does not return to the correct calendar entry. One worry is that the 2nd parameter for the ID of the control appears to be deprecated which implies it can not be used within array processing?
    Sorry, but this is for a client with APEX v2. We may push to three LOVs for the date if we can not do it with a calendar control.
    Phil

  • HTMLD_ITEM.DATE_POPUP  - Disabling text field AND Datepicker.

    Hi all,
    Need help with the following.
    I am using APEX 3.2.100.12 (this is in production and won't be upgraded soon).
    I have a report, that creates dynamically date_popups.
    My query goes like this:
    select
    case
    when trunc(ddc_delivery_date) <= trunc(sysdate) then HTMLDB_ITEM.HIDDEN(3,PTD_PA_MONTH_ID) || HTMLDB_ITEM.HIDDEN(4, to_char(SYSDATE, 'DD-MON-RRRR')) || HTMLDB_ITEM.DATE_POPUP(2,ptd_pa_month_id,'','dd-MON-yyyy', 10, 11, 'DISABLED')
    else HTMLDB_ITEM.HIDDEN(3,PTD_PA_MONTH_ID) || HTMLDB_ITEM.HIDDEN(4, to_char(SYSDATE, 'DD-MON-RRRR')) || HTMLDB_ITEM.DATE_POPUP(2,ptd_pa_month_id,'','dd-MON-yyyy', 10, 11, 'onBlur="valiDate(' || rownum || ');"onChange="setFocusItself(' || rownum ||');"')
    end as "Example"
    from Table;
    Let's assume all those names there work as it is.
    The first "when trunc... " should show the date_popup item, but should be shown disabled; which totally happens, but only on the text field; I also need the datepicker to be void or something, and no popup be allowed to show up, something like: "('IP_CLOSED_DATE').parentNode.nextSibling.firstChild.href="javascript:void(0)", which can be used to not allow a popup be displayed.
    The thing is, I've tried to add another parameter (as I've seen it is possible), including words like disabled, void, 0, etc... and none of them work. So I would like to know if anyone has encountered the same issue and has been able to solve it.
    What I need, is not only the text to be disabled but also the popup.
    Thanks a lot!!
    Jorgelina

    Just noticed that you are on apex 3.2 and that JS code relies on JQuery(builtin to Apex 4.0)
    So we ll try another approach and this does not use any JS
    From your report query, I can see that you column has to be read only when <u>trunc(ddc_delivery_date) &lt;= trunc(sysdate)</u>. In this case you want those row's column to be a readonly text-field. So <b>we use a different API in those cases, i.e APEX_ITEM.TEXT instead of APEX_ITEM.DATE_POPUP</b>
    select
        case
        when trunc(ddc_delivery_date) <= trunc(sysdate) then
            HTMLDB_ITEM.HIDDEN(3,PTD_PA_MONTH_ID) || HTMLDB_ITEM.HIDDEN(4, to_char(SYSDATE, 'DD-MON-RRRR')) || HTMLDB_ITEM.TEXT(2, TO_CHAR(<date column>,'dd-MON-yyyy', 10, 11 ,'read_only="read_only"')
        else
           HTMLDB_ITEM.HIDDEN(3,PTD_PA_MONTH_ID) || HTMLDB_ITEM.HIDDEN(4, to_char(SYSDATE, 'DD-MON-RRRR')) || HTMLDB_ITEM.DATE_POPUP(2,ptd_pa_month_id,'','dd-MON-yyyy', 10, 11, 'onBlur="valiDate(' || rownum || ');"onChange="setFocusItself(' || rownum ||');"')
        end as "Example"
    from <table>;
    Note: Change <date column> to the name of the date column whose value has to be shown
    For readonly date row columns, you would see a text field alone, without a date picker

  • HTMLDB_ITME.DATE_POPUP problems

    Hi,
    Since I did the HTMLDB patch my date_popup item is not working anymore. When I choose date in the popup calendar, the value returns in the first field , not the one where I clicked on the calendar icon.
    Here is my select :
    select htmldb_item.hidden(1,ei.id)||
    htmldb_item.hidden(3,ea.display_type)||
    htmldb_item.hidden(4,ea.length)||
    ea.name Attribute,
    case when :P4_ACCESS != 1 then ei.value
    when ea.display_type = 'Date'
    then htmldb_item.date_popup(2,rownum,ei.value,'dd-mon-yyyy',11)
    when ea.display_type = 'Flag'
    then htmldb_item.SELECT_LIST(2,ei.value,'Yes;Y,No;N,Unknown;U','YES')
    when ea.display_type = 'Domain'
    then HTMLDB_ITEM.SELECT_LIST_FROM_QUERY(2,ei.value,'SELECT value from extra_domains where exa_id = '||ea.id)
    else htmldb_item.text(2,ei.value,ea.length) end Value
    from extra_attributes ea, extra_infos ei
    where ei.exa_id = ea.id
    and ei.perso_id = :p4_id
    and ea.active = 'Y'
    order by ei.id
    Depending on a table (extra_attributes), I display the item diffently. I could be a select list, text , number or date.
    So in the same column , I can have different type of item. Ex: Row 1 col1 can be text and Row2 col1 can be date etc ...
    Thanks.
    Francis.

    Francis,
    In HTML DB 1.5 and before there were some known issues when using htmldb_item.date_popup calls in tabular forms and regular reports with pagination. Those issues have been resolved. Neither the built-in tabular forms nor the htmldb_item API package are designed to support different display types in the same column. If this was possible in 1.5 and no longer works in 1.5.1 then this seems to be related to the fix for the pagination issue. Since mixing display types is not a supported feature, unfortunately I can't offer you work around. The problem is the index of your current row that is part of the Java Script popup function, which in you example on htmldb.oracle.com points to 0 and thus correctly returns the date into the text field in your first row.
    Regards,
    Marc Sewtz

  • HTMLDB_item.Date with row selector

    Hi :
    In my application i am using htmldb_item.datepicker and row selector to insert the date object wise
    the problem wht i am facing is if suppose 10 rows are generated when i select 3rd row date and insert date picker date get populated in 2nd row similarly 2nd rows to 1st and so on
    please try this query
    SELECT
    HTMLDB_ITEM.DISPLAY_AND_SAVE(2,NULL) "Project Objects",
    HTMLDB_ITEM.DATE_POPUP(3,rownum,null,'dd-mon-yyyy',12,15) "date"
    FROM
    DUAL
    UNION
    SELECT
    HTMLDB_ITEM.DISPLAY_AND_SAVE(2,SYSDATE) "Project Objects",
    HTMLDB_ITEM.DATE_POPUP(3,rownum,null,'dd-mon-yyyy',12,15) "date"
    FROM
    DUAL
    first change this query to sql updatable report and add row selector then try to select date from 2nd row ull find the problem wht i am facing
    please suggest how to resolve this
    thanks
    sudhir

    ya we it wont update when we use a rownum when we resort and update i did like this see if you can understand the code
    DECLARE
    vRow binary_integer;
    BEGIN
    for i in 1..htmldb_application.g_f01.count
    loop
    vRow := htmldb_application.g_f01(i);
    UPDATE SCHEDULE_VARIANCES
    SET
    REVISED_START = htmldb_application.g_f02(vRow),
    REVISED_END = htmldb_application.g_f03(vRow),
    ACTUAL_START = htmldb_application.g_f04(vRow),
    ACTUAL_END = htmldb_application.g_f05(vRow),
    STATUS = htmldb_application.g_f06(vRow),
    -- ACCEPTANCE = htmldb_application.g_f07(vRow),
    COMMENTS = htmldb_application.g_f08(vRow)
    where
    PROJECT_NAME = :P25_PROJECTS AND
    OBJECT_NAME = htmldb_application.g_f09(vRow) ;
    end loop;
    End;
    here i am relating object name to row selector that is the check box so that when u sort the row also based on the object name that u select it will update this worked for me
    thanks
    sudhir

  • Date_popup returning value to wrong row

    I have looked at the thread below and still cannot get my code to work
    Re: prevent certain rows in updateable report from being updated??
    I have a tabular form that is used for a mass approval system for managers. In this tabular form the managers are allowed to change 2 fields...that status field which is a static lov and the approval date field. The approval date field will always be null when the user comes into the form so we have this field set automatically to the sysdate. The problem we are encountering is that when we change the date field to something other than sysdate the system will send the new date from the date picker to a different row. I found the thread above and tried to implement it in my code but it is still returning the data to the wrong row. I was trying to decipher the code and wasn't really sure about it so I thought I would put my code here in hopes that someone could help me. (NOTE - I don't really need the decode statement for the date_popup but if I didn't have it I would get an error so the first part of my decode statement shouldn't ever be hit cause we don't have an approval status of P.
    Query Code
    select
    HTMLDB_ITEM.HIDDEN(1,EVAL."EVAL_ID") EVAL,
    EVAL."EVAL_ID" EVAL_ID_DISPLAY,
    HTMLDB_ITEM.SELECT_LIST(2,nvl(EVAL.APPROVE_MID,'Y'),'Approve;Y,Deny;N') MID_STATUS,
    EVAL."EMP_ID",
    EVAL."MID_BEHAVIOR_TOT_AVG",
    EVAL."MID_PERF_TOT_AVG",
    EVAL."FNAME" || ' ' || EVAL."LNAME" NAME,
    EVAL."LOCK_FLAG_MID",
    NVL(EVAL."SUPERVISOR_NAME", ' ') SUPERVISOR,
    decode(EVAL.APPROVE_MID,'p',htmldb_item.text(3,to_char(eval.approve_mid_date,'dd-mon-yyyy'),null,null,'onfocus=this.blur()')||substr(htmldb_item.date_popup(3),1,0),htmldb_item.date_popup(3,NULL,NVL(eval.approve_mid_date,SYSDATE),'dd-mon-yyyy')) mid_date
    from "#OWNER#"."EVAL", "#OWNER#"."EMPLOYEE", "#OWNER#"."TEMP_EMP"
    WHERE EMPLOYEE."SUPERVISOR" = (SELECT POS_NUM FROM EMPLOYEE WHERE TEMP_EMP.CENUM = :APP_USER AND EMP_ID = TEMP_EMP.EMP_ID) AND EMPLOYEE.EMP_ID = EVAL.EMP_ID
    Custom Submit Code
    for i in 1..htmldb_application.g_f01.count
    loop
    update eval
    set approve_mid = htmldb_application.g_f02(i)
    where eval.eval_id = htmldb_application.g_f01(i);
    commit;
    IF :P72_DATE_OVERRIDE IS NULL THEN
    update eval
    set approve_mid_dATE = htmldb_application.g_f03(i)
    where eval.eval_id = htmldb_application.g_f01(i);
    commit;
    ELSE
    update eval
    set approve_mid_date = :P72_DATE_OVERRIDE
    where eval.eval_id = htmldb_application.g_f01(i);
    end if;
    commit;
    end loop;
    HELP PLEASE!!!!!
    Thanks,
    Amber

    mtuser,
    you have to be a little bit more patient, your initial postings was just a few hours ago.
    About your problem, have a look at Re: prevent certain rows in updateable report from being updated??
    I think it explains your problem and offers a solution for it.
    Patrick
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/

  • DATE_POPUP

    When I use htmldb_item.date_popup in SQL report with an order by clause,
    the data that I select to replace the current row goes to another row instead.
    This does not happen if I remove the order by clause.
    Has anyone encountered this ? How to work around it ?

    I had the same problem, and used this workaround:
    Put the original query in a subquery where you do the order by and then build the date popup on the result set.
    For example, if your original query is
    SELECT field1,
                  field2,
                  apex_item.date_popup(1,date_field) "My Date"
    FROM someTabel Order by field 1then try
    SELECT /*+NO_MERGE(sub)*/
                 subfield1,
                  subfield2,
                  apex_item.date_popup(1,subdate_field) "My Date"
    FROM  (
           SELECT
               field1 subfield1,
               field2 subfield2,
               date_field subdate_field
            FROM someTabel Order by field1
              ) subThe NO_MERGE hint is needed to prevent the optimizer from merging your query and the subquery back into one query.
    Regards
    Stephan

  • DATE_POPUP BUG

    DATE_POPUP works perfectly fine if you just have one date that you want to use it for, but it generates the code incorrectly for more than one.
    For example, I have PL/SQL generating text fields and if the value of the text field is in DATE format, it will insert this line:
    HTMLDB_ITEM.DATE_POPUP( 2, NULL, l_columnValue, 'DD-MON-YY' )
    If there is only one DATE_POPUP, the source generated is correct:
    opener.document.forms[0].f02.value = x;
    But if there are two, HTMLDB generates incorrect source for each popup:
    opener.document.forms[0].f02[].value = x;
    Because it never specifies an index, clicking a date will not set the field to the proper date, nor will it closed. Let me know if anyone has a solution for this problem or if there will be a bug fix some time in the near future. Thanks.

    I have an external package that gets called with certain parameters. This is the relevant code:
    FOR lbl IN lbl_cursor( pFN_ID )
    LOOP
    IF (lbl_cursor%rowcount = 1) AND pUPDATE = false THEN
    htp.p( l_columnValue );
    htp.p( HTMLDB_ITEM.HIDDEN( 1, l_columnValue ) );
    ELSIF pUPDATE = false THEN
    IF lbl.FNP_DB_TYPE = 'DATE' THEN
    htp.p( HTMLDB_ITEM.DATE_POPUP( 2, NULL, l_columnValue, 'DD-MON-YY' ) );
    ELSE
    htp.p( HTMLDB_ITEM.TEXT( 1, l_columnValue ) );
    END IF;
    END IF;
    END LOOP;
    Everything is being generated correctly visually and it works perfectly fine when there is only one DATE_POPUP. The problem only occurs when there are two or more DATE_POPUPs.

  • Possible bug with APEX_ITEM.DATE_POPUP

    Hello,
    APEX 3.1 (and maybe even some previous versions).
    It seems like APEX_ITEM.DATE_POPUP creates all the cells in the corresponding column with the same ID. The result is that the dates returned by every date picker, in all the rows of the column, are being placed only in the first row cell.
    I searched the forum, and found couple threads describing the problem, but nothing from the APEX team acknowledging a bug. Is it a bug? If so, and if it’s not already logged, can someone from the APEX team log it as one?
    Thanks,
    Arie.

    Hi Arie,
    Thanks for you reply i dont get any error msg here in date picker the only problem wht i am facing here is when i deploy the java script date picker is not working
    Please suggest me how to modify the existing code
    this is function wht i am calling in the date picker
    <script type="text/javascript">
    function checkdates_baseline(pStartDateItem,pEndDateItem)
    var sdate = document.getElementById(pStartDateItem).value;
    var edate = document.getElementById(pEndDateItem).value;
    if(sdate != "" & edate != "")
    var m2int = {
    Jan: 0,
    Feb: 1,
    Mar: 2,
    Apr: 3,
    May: 4,
    Jun: 5,
    Jul: 6,
    Aug: 7,
    Sep: 8,
    Oct: 9,
    Nov: 10,
    Dec: 11 };
    var start_year = sdate.substring(7,11);
    var start_month = sdate.substring(3,6);
    var start_day = sdate.substring(0,2);
    var start_date = new Date(start_year, m2int[start_month], start_day);
    var end_year = edate.substring(7,11);
    var end_month = edate.substring(3,6);
    var end_day = edate.substring(0,2);
    var end_date = new Date(end_year, m2int[end_month], end_day);
    if( end_date <= start_date )
    alert('The End date must be after the Start Date Baseline');
    document.getElementById(pEndDateItem).value = "";
    </script>
    and this is the SQL query where i am using and deployed the java script
    SELECT
    HTMLDB_ITEM.DATE_POPUP(3,1,null,''DD-Mon-YYYY'',10,8,
    '' id="sdate''||rownum||''" readonly="yes"
    onchange="checkdates_baseline(''''sdate''||rownum||'''''',''''edate''||rownum||'''''');"'')
    "Baseline Start",
    HTMLDB_ITEM.DATE_POPUP(4,2,null,''DD-Mon-YYYY'',10,15,
    '' id="edate''||rownum||''" readonly="yes" onchange="checkdates_baseline(''''sdate''||rownum||'''''',''''edate''||rownum||'''''');"'') "Baseline End"
    FROM
    DUAL
    please suggest with a code or a example how to change this, in apex 3.1
    thanks
    Sudhir

  • Apex_item.date_popup 3.1 bug?

    In an updateable report region, I have a date picker item. However, on my app, when I pick the date, it always populates the first row.
    This does not work:
    select gl_rpt_item_id, description, act_flag, apex_item.hidden(1, gl_rpt_item_id) as item_id,
    apex_item.date_popup(6,rownum, decode(client.get_gl_date(:f102_client_centric_id, gl_rpt_item_id),'NULL','',to_char(client.get_gl_date(:f102_client_centric_id, gl_rpt_item_id))),'DD-MON-YYYY',11,11,decode(act_flag,'I','"DISABLED"'))
    new_gl_dt
    from gl_rpt_item where is_clinical = 'Y' and act_flag <> 'I'
    However, this does populate the right item, I'm just not sure how to handle the save.
    select gl_rpt_item_id, description, act_flag, apex_item.hidden(1, gl_rpt_item_id) as item_id,
    apex_item.date_popup(rownum,rownum, decode(client.get_gl_date(:f102_client_centric_id, gl_rpt_item_id),'NULL','',to_char(client.get_gl_date(:f102_client_centric_id, gl_rpt_item_id))),'DD-MON-YYYY',11,11,decode(act_flag,'I','"DISABLED"'))
    new_gl_dt
    from gl_rpt_item where is_clinical = 'Y' and act_flag <> 'I'

    Scott,
    even the java script wht i use to call in date picker in old version that is not working here in new version
    example :
    select
    HTMLDB_ITEM.DATE_POPUP(3,1,null,'DD-Mon-YYYY',10,15,
    ' id="sdate'||rownum||'" readonly="yes"
    onchange="checkdates_baseline(''sdate'||rownum||''',''edate'||rownum||''');"' ) "Baseline Start",
    HTMLDB_ITEM.DATE_POPUP(4,2,null,'DD-Mon-YYYY',10,15,
    ' id="edate'||rownum||'" readonly="yes" onchange="checkdates_baseline(''sdate'||rownum||''',''edate'||rownum||''');"') "Baseline End"
    from
    dual
    thanks
    Sudhir

Maybe you are looking for

  • Help Needed for selection screen

    Hi Experts I'm doing one report of pm module using one standard program called me RIQMEL10              my query is if u execute this stand.prog u'll get one selection screen ,and having three selction-screen blocks.  first sel-scr block name is Noti

  • ISE Airespace ACL WLC problem

    Hello, i've configured ISE and WLC to use guestportal with CWA but there is a problem with CoA -- it doesn't want to apply airespace alc after auth at guestportal. 1. At authC page i've configured a wireless MAB to continue if user not found and to u

  • HT1848 Tell me the method of connecting my ipad tp the pc please.

    Tell me how to connect my ipad to the pc when I update to IOS 7, please.

  • Converting XML and XSL into HTML

    Hello! I'm designing a servlet class that merges an xml file and xsl file into html that will be sent to the client. But I don't understand how the (sparsely documented) javax.xml.transform.dom package works. An exception is generated for a missing "

  • Vendor creation

    Vendor is having different locations and accordingly they are supplying materials, but in the vendor master we want to maintain master data with single location only as a policy decision. Example: we are maintaing vendors "X" plant details in the ven