Disable date picker

How do I disable date picker item (specifically the date picker pop up). I am workingon Version 3.0
Thanks and Regards,
Kumar

Hello Kumar,
In that blog post I explained how you can disable the clickable datepicker image (that will show the popup), when you disable your datefield.
As you can see in the comment, if you add a condition to make the date field read-only the icon is automatically removed, but if you disable the datefield during navigation on your screen (using javascript), that wasn't happening.
And in the example I used jQuery (installing that is a prerequisite), to disable all icons of date fields that are disabled.
A function for disabling the icon of a specific datefield should be something like:
function disableIcon( pThis ){
  var i=this.id;  
  $('#'+i+'_IMG').click(function() 
  {return (!document.getElementById(i).disabled);}); 
}And you can call that using : disableIcon('Pxyz_DATE');
HTH
Greetings,
Roel
http://roelhartman.blogspot.com/

Similar Messages

  • Enable/Disable Date Picker

    I created an APEX page with two items named P47_APPROVED_YN and P47_APPROVED_DATE. The page item P47_APPROVED_DATE is controlled with the following logic in the HTML Header property:
    function disAD()
    var lVal = $v('P47_APPROVED_YN');
    if(lVal == 'Y')
    $x('P47_APPROVED_DATE').disabled=false;
    $x('P47_APPROVED_DATE').style.backgroundColor = 'white';
    else
    $x('P47_APPROVED_DATE').disabled=true;
    $x('P47_APPROVED_DATE').style.backgroundColor = 'lightblue';
    P47_APPROVED_DATE is enabled and disabled properly when I select P47_APPROVED_YN but the date selector, defined in the item Display-as property, still displays and allows the user to select a date even when P47_APPROVED_DATE is disabled.
    Question: How do I enable or disable the date selector when P47_APPROVED_YN == ‘Y’ or 'N'?
    Thank you, Ned

    See this thread... disable date picker
    Thank you,
    Tony Miller
    Webster, TX

  • Javascript-disabled date picker items

    If I disable a Date Picker item via Javascript the user can still enter a date into it via the calendar pop-up: I want to prevent this. Is there any easy way to do so? All I can think of currently is to build my own date picker functionality, with the icon as an item that I can hide or show via Javascript.

    Hello,
    Following Carl’s idea, the following should allow you to disable/enable a date picker item:
    function toggleDatePicker (pThis, pDisable) {
      var lNode = $x_UpTill(pThis,'TR');
      lNode.disabled = pDisable;
      var lNode = $x_UpTill(pThis,'TD');
      var lA = lNode.getElementsByTagName('A');
      if(pDisable){
        if(lA[0].getAttribute('href')){
           lA[0].setAttribute('onclickoff',lA[0].getAttribute('href'));
           lA[0].setAttribute('href','javascript: void(0);');
      }else{
       if(lA[0].getAttribute('onclickoff')){
         lA[0].setAttribute('href',lA[0].getAttribute('onclickoff'));
    }pThis is the date picker item name. pDisable set to true will disable the item, and false will enable it.
    Although the user can enter a date into the field, it’s still disabled. That means that this item will not be POSTed to the server and will not be set in session state.
    Hope it helps,
    Arie.

  • How to disable the date picker in manualy Tabular form?

    I develope an application with apex 3.2 , I builded a tabular form manualy with APEX API and I have an item 'date picker' , I want that once user want insert the date , he can do it only by clicking on the date picker and not into the item
    I try to use the code that was provided by 'Desnes Kubicek' on his blog , but it does not works
    Any help!!!!!
    I used this code , but that is for an one item form
    <script type="text/javascript">
    function disFormItems(item1){
    disItem = document.getElementById(item1);
    disItem.style.background = '#eeeeee';
    disItem.disabled = true;
    </script>
    2. Region Footer javascript:
    <script type="text/javascript">
    disFormItems('P18_DATE_PICKER');
    </script>

    Hi,
    Try something like this
    SELECT
    APEX_ITEM.DATE_POPUP(4,rownum,hiredate,'dd-mon-yyyy',12,15,'readonly="readonly"','f04_' || ROWNUM) hd
    FROM EMP;Thanks,
    Manish

  • If Date Pick is future Date then Select List should get disabled

    Hi,
    I use Application Express 3.1.1.00.09 version.
    Item P320_LATEST_DLR_DATE_PROJECT which is Date Picker(DD-MON-RR), if the date selected is greater than system date then P320_LATEST_DLR_RATING_PROJECT which is Select List should get disabled.
    I tried in this manner:
    1. Javascript in the Page Header:
    <script>
    function dis_selectlist(pThis, pThat)
    if (pThis.value > 'SysDate')
    {$x(pThat).disabled = true;}
    else{$x(pThat).disabled = false;}
    </script>
    2. Date Picker(P320_LATEST_DLR_DATE_PROJECT) HTML Form Element Attribute:
    onchange="dis_selectlist(this,'P320_LATEST_DLR_RATING_PROJECT')"
    But it is not resulting in disabling of Select List Item.
    Can any one tell me if this is proper or any other method to get the result?
    Thanks,
    Priyanka.

    except for making a calendar (http://active.tutsplus.com/tutorials/actionscript/understanding-date-making-a-calendar-in- as3/) there is only logic needed to create that app.

  • Two questions: Event on a Date Picker and Read Only on a full page?

    Hello,
    I make use of this very informative board to develop an application but i have been unable to find info on these two topics. Sorry if it has been already discussed extensively.
    Using HTMLDB 2.2 for now.
    =>First question:
    I have a date picker item with an event
    onChange="resaStatusChange();"
    in the HTML Form Element Attribute field.
    The event is triggerring if i put a new data in the field but does not trigger if i use the picker.
    Is it a standart behaviour? Is there a way to trigger the event when new data is provided through the date picker?
    => Second question:
    One page in my application has to be used either to only display information or as a mixed displaying/entering data sheet.
    When the context is appropriate to use the page as a simple display (testing both global authorization and data to be displayed), is there a way to put a read only attribute on the full page instead of putting the read only conditions through each and every item of the page?
    Sorry if the questions are not clear and apologize for what should be newbie questions.
    Any link or info will be appreciated.
    Regards,
    Daniel Gureghian

    Hi Daniel,
    I'm not sure about your first question, but I can hopefully give you a helpfull answer for your second one.
    I'm handling it this way:
    var elInput = document.getElementsByTagName('input');
    var elTextArea = document.getElementsByTagName('textarea');
    var elSelect = document.getElementsByTagName('select');
    for (i = 0; i < elInput.length; i++)
      setReadOnly(elInput, true);
    for (i = 0; i < elTextArea.length; i++)
    setReadOnly(elTextArea[i], true);
    for (i = 0; i < elSelect.length; i++)
    setReadOnly(elSelect[i], true);
    function setReadOnly(pThis, pRead)
         if (pThis && pRead)
              pThis.disabled = pRead;
              pThis.style.emptyCells = "show";
              pThis.style.color = "black";
              pThis.style.backgroundColor = "#DDDDDD";
         else if (pThis && !pRead)
              pThis.disabled = pRead;
              pThis.style.emptyCells = "show";
              pThis.style.color = "black";
              pThis.style.backgroundColor = "#FFFFFF";
    I never used it on a whole page, only for regions. So maybe you have to make some changes.
    chrissy

  • Read only date picker in an updatable query

    Dear all,
    There is a date picker component in my application. I need to disable data entry or any changes in a known condition. However when I create a dynamic action it only make the text field readonly.
    __Please be advised that the date picker is in an up-datable query__ .
    It also would be practical if I would be able to hide the javascript date picker button.
    regards

    Solved my problem by adding the following codes into the datepicker javascript:
    if (document.getElementById(dateFieldName).readOnly)
    return false;

  • Disable Date Fields

    I am using javascript to disable date fields, so the users are forced to use the date pickers. The field is disabled and the date picker works but when I save the record the entry in the date field disappears.
    Page Header
    <script language="JavaScript1.1" type="text/javascript">
    function disFormItems(item1){
    disItem = document.getElementById(item1);
    disItem.style.background = '#ffffff';
    disItem.disabled = true;
    </script>
    Region Footer
    <script language="JavaScript1.1" type="text/javascript">
    disFormItems('P1_TEXT_AREA');
    </script>
    Any ideas
    Gus

    Tried as you suggested. The filed is disabled but there is no button for the calendar.
    Changed date field to text and in post element I copied:
    <script type="text/javascript">
    function genCal0_p_t16_18()
    w = open("wwv_flow_utilities.show_as_popup_calendar" +
    "?p_element_index=" + escape('p_t16') +
    "&p_form_index=" + escape('0') +
    "&p_date_format=" + escape('DD-MON-YY') +
    "&p_bgcolor=" + escape('#666666') +
    "&p_dd=" + escape('') +
    "&p_hh=" + escape('') +
    "&p_mi=" + escape('') +
    "&p_pm=" +
    "&p_yyyy=" + escape('2006') +
    "&p_lang=" + escape('en-gb') +
    "&p_application_format=" + escape('Y') +
    "&p_mm=" + escape('12'),
    "winLov",
    "Scrollbars=no,resizable=yes,width=258,height=210");
    if (w.opener == null)
    w.opener = self;
    w.focus();
    </script>
    Is this correct
    Gus

  • Move Date Picker Pop Up Location

    Hello All,
    What is the easiest way to move the location of the pop up window when using a Date Picker on a form page?
    Currently using Sand Theme it pop ups at the top of the screen in IE and Firefox.
    We would like it to popup right next to the item on the form?
    We have several on a form and would like to get the users accustom to same location or middle of screen focus.
    Regards,
    Robert

    I don't think this is possible whether you can access the javascript or not. There are a few essential parameters which are, as far as I know, unavailable. These are:
    o the position of the browser window on the screen
    o the height of the 'chrome' (title bar, menus, icons, address bar, tabs, etc) above the page
    o the width of the chrome on the left of the page, eg the bookmarks
    Also, the width, in pixels, of the input item cannot be known. This would be necessary for my solution (below), where I position the window relative to the input item, as that's the nearest element with an ID.
    The javascript generated by ApEx for the data picker doesn't declare the window object's reference with the VAR keyword (this terminology may be way off track!), so I was able to create a wrapper around this and create a variable with the same name, which will be in scope for the ApEx javascript. Now I can reference the popup window when ApEx has finished creating it. Then it's just a case of finding the input field's position on the page (using this: http://www.quirksmode.org/js/findpos.html) and adjusting for the page scroll and 'chrome' size before setting the date picker's position.
    This assumes the browser window is at the top-left of your screen and that all the chrome (even the status bar) is at the top or left of the window.
    http://htmldb.oracle.com/pls/otn/f?p=25637:12
    Works in Firefox but not IE6. Works in Opera but behaves slightly differently than in FF.
    You can use the same technique to hack the javascript and position the window in the middle of the screen but I wouldn't bother. It should be possible, but it would need implementing on an item-by-item basis and might break in later versions of ApEx. Also, Firefox has an option to disable any javascript which moves windows, so some users would never notice your efforts.

  • Restrict last date of month from date picker

    Hi All,
    I have a requirement to restrict the date picker.
    I want to allow the user to select only the last date of the month from the following four months march, June, September and December.
    I have googled about this i couldn't get related that except that restrict invalid days/months.
    Please suggest to find solution for this.
    My Jdev version is 11.1.2.0.0
    Thanks in advance,
    SAN

    Hi,
    Have a backing bean to construct a list of days to be disabled and set that to disabledDays property of the picker component.
    Ex : Re: Bug on the property "disabledDays" of the component af|inputDate ?
    -Arun

  • Strange behavior of Date Picker

    APEX 3.2.1.00.10
    For some reason when I place the cursor on the Date Picker input text area and press <enter>, the page submits and I'm redirected to a URL of: http://[apex url removed here]/wwv_flow.accept. This page has the following message:
    "ERR-1777: Page 27 provided no page to branch to. Please report this error to your application administrator."
    Restart Application
    The Date Picker item on a page (page 27) is specified as:
    Name: P27_BEG_DATE
    Display as: Date Picker (MM/DD/YYYY)
    Source Used: Only when current value in session state is null
    Source Type: Static Assignment (value equals source attribute)
    Format Mask: MM/DD/YYYY
    Default Value:
    DECLARE
      v_date DATE;
    BEGIN
      SELECT trunc(SYSDATE,'YEAR')
        INTO v_date
        FROM dual;
      RETURN TO_CHAR(v_date,'MM/DD/YYYY');
    END;
    Default Value Type: PL/SQL Function Body
    This item is conditionally displayed and strangely enough, there are no processes or branches that are triggered on this particular item that would cause the page to submit. This behavior is present in both IE and FireFox. Any ideas?

    I have resolved the issue. I'm not sure if this is the behavior of all browsers (as the thread below indicates) or whether it is an APEX bug, but adding the following HTML to the Header Text attribute of my page prevents the page from submitting. Apparently when a page has a single input field (as in the case with input field associated with my Date Picker item), the browser will submit the page when <enter> is pressed even though page branching is not defined for such circumstance.
    <!-- Dummy input created to prevent submit of page -->
    <input type="text" style="border:0;" disabled="disabled" />OTN thread regarding page submit when single input on page:
    [Link here|http://forums.oracle.com/forums/thread.jspa?messageID=2184305]

  • Only Select date from date picker

    Hi All,
    How can I disable typing date in field text (Choose Date Component)? On other words the user can just select from date picker .
    Thanks
    Message was edited by:
    user638709

    Thank you for replying.
    Actually, I tried to plug the java script in the JSP page but still I did not manage to disable user input. I followed these step:
    1. Add the script
    <script type="text/javascript">
    function filterInputComponent(){
    var component = document.getElementById("inputDate1");
    component.setAttribute("style","background-color:#ebe9e9");
    component.onfocus = function(evt){                  
    var _lovButton = component.nextSibling.nextSibling.nextSibling.nextSibling;
    _lovButton.focus();
    </script>
    2.Define Id for selectIputDate component as "inputDate1"
    3.Change onload - body property to be "filterInputComponent"
    What might be the problem? Did I miss some steps? Or?
    Thanks

  • Date Picker has to submit the default value after the page load???

    Hello All,
    I have 2 date pickers 'Start' and 'End' on a screen with report that has a where clause using above values. Start defaults to current date, End defaults to current month end date, I have another radio group with default to Monthly......
    Now when the page loads, I see the default values for 'Start' and 'End' date pickers but the report doesn't reflect those values. I added an on change dynamic action, and so when I change the value of 'End' date picker, it submits the page and now the values are reflected in the report........
    I tried creating another dynamic action > with event On Page Load.....and disable fire on page load, and to submit the page, this is causing an infinite loop of submitions........can you please tell me how to achieve this with out putting an exclusive submit button on the Screen.......
    Thanks for your time.
    DK

    user12296343 wrote:
    Hello All,
    I have 2 date pickers 'Start' and 'End' on a screen with report that has a where clause using above values. Start defaults to current date, End defaults to current month end date, I have another radio group with default to Monthly......
    Now when the page loads, I see the default values for 'Start' and 'End' date pickers but the report doesn't reflect those values. I added an on change dynamic action, and so when I change the value of 'End' date picker, it submits the page and now the values are reflected in the report........
    I tried creating another dynamic action > with event On Page Load.....and disable fire on page load, and to submit the page, this is causing an infinite loop of submitions........can you please tell me how to achieve this with out putting an exclusive submit button on the Screen.......
    Thanks for your time.
    You don't have to submit the page here.
    What version of apex?
    What report is it? i.e. Interactive report/Classic report
    Depending on your version of apex you can simply use the Page Items to Submit attribute to set the session state

  • Disabling data usage on Elipsis Tablet does not turn of Data Usage

    Yesterday purchased 3 tablets for my kids. First thing I did when I got home was add home wifi and disable data usage. Ridicoulous but this does not disable data usage. Tablet used 4gb of data before I realized what was going on, all the while connected to home Wifi, like the data connectio took precedence. This is a major flaw of this tablet. Called Customer Service, waiting for a mgr to call back. Unfortunatly waiting on hold for over 45min without getting to tech support but in the end the only way to turn off data apparently (or at least I found) was to put in Airplane mode. This is not right!
    Even support forum states this is the way to enable/disable data. I feel dooped!

        I'm sorry you waited so long trying to get through to Tech Support dm805. I know being able to disable Mobile Data is important to keep usage under control. As Ann154 mentioned, you are able to turn off Mobile Data in Settings. You can go to Settings> Data Usage> Select Mobile Data (at top right hand side), and it will turn off.  You can also go to Settings> More> Mobile Networks> Uncheck Data Enabled.
    I hope this helps.
    Thank you,
    VanessaS_VZW
    Follow us on Twitter @VZWSupport

  • 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

Maybe you are looking for

  • External USB storage no longer recognized by kernel [SOLVED]

    If I plug in an external USB thumb drive, my system no longer sees it. -gdisk and fdisk do not see it -gparted cannot see it -thunar cannot see it I have a USB mouse and keyboard that work just fine.  Here is my dmesg.  You can see in the last line t

  • How can I update a JTextArea from another class

    I am new to Java so forgive me if this is confusing, or if I seem to be taking an overly complex route to acheiving my goal. I've got a JTextArea component added to a JPanel object, which is then inserted into the JFrame. I have a JMenuBar with a JMe

  • Problem with text window

    On my timeline I had white titles and at the end a green title with a parcially transparent background. When i restarted the project my titles were green and the end titels were black without the transparent background. And one of the music track was

  • Logging to Oracle

    Hello, I wanted to log on to Oracle server. Basically we have SAP XI and the database is Oracle. how can I log on to ORacle? Thanx

  • Text Migration from One system to another

    I need to migrate texts from one system to another system. More of a data migration where in all text ex sales order Purchase order etc need to be migrated. If someone has worked on such requirement and can share the steps involved where in we can ma