Jquery- Datepicker


I want to keep custom date-picker in the request form. I've gone through
the forums and my understanding are as follows
Created a war file (DC.war) with the below structure and kept js ans css
files.. I've copied that war file into user application server's
/opt/novell/idm/jboss/server/IDMProv/deploy directory.

DC
resource
javascript
jQuery Theme
jquery.ui.datepicker.js jquery.ui.datepicker.css

In the Request form I've the following
Form Field Name - input
Data Type - string
Control Type - HTML

input => propery > content => (function () { return "<input type=text
id=input / >" })()
input => onload => $("#input").focus(function(){ $( "#__input"
).datepicker();});

Im referring the Jquery and CSS libraries by scripts => onload => inline

</script>
<link type="text/css"
href="/DC/resource/javascript/jQuery/themes/jquery.ui.all.css"
rel="stylesheet" />
<link type="text/css"
href="/DC/resource/javascript/jQuery/themes/jquery.ui.datepicker.css"
rel="stylesheet" />
<script type="text/javascript"
src="/DC/resource/javascript/jQuery/jquery.ui.button.js"></script>
<script type="text/javascript"
src="/DC/resource/javascript/jQuery/jquery.ui.position.js"></script>
<script type="text/javascript"
src="/DC/resource/javascript/jQuery/jquery.ui.datepicker.js"></script>
<script>

When I deploy my PRD, I could see the text box Im not getting what I
wanted to achive ( http://jqueryui.com/datepicker/ )

Anybody can advise me what Im missing ? am keeping the war file as
expected by user app? is it in the right structure ? Your help would be
much appreciated

Regards
Nirmal Dhanaraj


--
dhanarajn
------------------------------------------------------------------------
dhanarajn's Profile: https://forums.netiq.com/member.php?userid=4357
View this thread: https://forums.netiq.com/showthread.php?t=52701

  • Welcome to jQueryUI fun!

    Try this:
    * in your HTML field content use
    ______________________________________________________

    (function () { return "<input type=text id=\"dptest\" />" } )()
    ______________________________________________________

    Note: rather do not re-use the field ID

    * in your form script use
    ______________________________________________________

    </script>
    <link type="text/css"
    href="/DC/resource/javascript/themes/base/jquery.ui.all.css"
    rel="stylesheet" />
    <script type="text/javascript"
    src="/DC/resource/javascript/jQuery/jquery-1.9.1.js"></script>
    <script type="text/javascript"
    src="/DC/resource/javascript/jQuery/jquery-ui-1.10.2.custom.js"></script>
    <script>

    function jqinit()
    {
    $( '#dptest' ).datepicker();
    }
    ______________________________________________________


    * in your form:onload() handler use
    ______________________________________________________

    window.setTimeout( "jqinit ()", 500 );
    ______________________________________________________


    That should do it.

    Good luck
    Wolfgang




    On 30.01.2015 13:14, dhanarajn wrote:
    >
    > I want to keep custom date-picker in the request form. I've gone through
    > the forums and my understanding are as follows
    > Created a war file (DC.war) with the below structure and kept js ans css
    > files.. I've copied that war file into user application server's
    > /opt/novell/idm/jboss/server/IDMProv/deploy directory.
    >
    > DC
    > resource
    > javascript
    > jQuery Theme
    > jquery.ui.datepicker.js jquery.ui.datepicker.css
    >
    > In the Request form I've the following
    > Form Field Name - input
    > Data Type - string
    > Control Type - HTML
    >
    > input => propery > content => (function () { return "<input type=text
    > id=input / >" })()
    > input => onload => $("#input").focus(function(){ $( "#__input"
    > ).datepicker();});
    >
    > Im referring the Jquery and CSS libraries by scripts => onload => inline
    >
    > </script>
    > <link type="text/css"
    > href="/DC/resource/javascript/jQuery/themes/jquery.ui.all.css"
    > rel="stylesheet" />
    > <link type="text/css"
    > href="/DC/resource/javascript/jQuery/themes/jquery.ui.datepicker.css"
    > rel="stylesheet" />
    > <script type="text/javascript"
    > src="/DC/resource/javascript/jQuery/jquery.ui.button.js"></script>
    > <script type="text/javascript"
    > src="/DC/resource/javascript/jQuery/jquery.ui.position.js"></script>
    > <script type="text/javascript"
    > src="/DC/resource/javascript/jQuery/jquery.ui.datepicker.js"></script>
    > <script>
    >
    > When I deploy my PRD, I could see the text box Im not getting what I
    > wanted to achive ( http://jqueryui.com/datepicker/ )
    >
    > Anybody can advise me what Im missing ? am keeping the war file as
    > expected by user app? is it in the right structure ? Your help would be
    > much appreciated
    >
    > Regards
    > Nirmal Dhanaraj
    >
    >

  • I've seen conflict with with jQuery and IDM 4.5. If you load jQuery taking ownership of $ it might give you some issues. However
    the following code in the forms onload seems to solve it:

    "
    var _jQuery = jQuery.noConflict(true);

    storeGlobalVars( IDVault, form, RoleVault, _jQuery );
    "

    storeGlobalVars is a form script that stores varables that is out of scope in some situations:
    "
    // Global Variables
    var globalVars = new Object();

    // called from form:onload to permanently remember some global vars
    function storeGlobalVars( IDVault, form, RoleVault, _jQuery )
    {
    globalVars.IDVault = IDVault;
    globalVars.form = form;
    globalVars.RoleVault = RoleVault;
    globalVars._jQuery = _jQuery;
    }
    "

    Once this is done $ is restored to it's previous object and you should be fine using globalVars._jQuery instead.

    If I remember correctly the issue I had was date fields and an error like "_d.datepicker is not a function". jQuery version was
    1.11.2.

    Best regards,
    Tobias


    On 2015-01-30 22:51, Wolfgang Schreiber wrote:
    > Welcome to jQueryUI fun!
    >
    > Try this:
    > * in your HTML field content use
    > ______________________________________________________
    >
    > (function () { return "<input type=text id=\"dptest\" />" } )()
    > ______________________________________________________
    >
    > Note: rather do not re-use the field ID
    >
    > * in your form script use
    > ______________________________________________________
    >
    > </script>
    > <link type="text/css" href="/DC/resource/javascript/themes/base/jquery.ui.all.css" rel="stylesheet" />
    > <script type="text/javascript" src="/DC/resource/javascript/jQuery/jquery-1.9.1.js"></script>
    > <script type="text/javascript" src="/DC/resource/javascript/jQuery/jquery-ui-1.10.2.custom.js"></script>
    > <script>
    >
    > function jqinit()
    > {
    > $( '#dptest' ).datepicker();
    > }
    > ______________________________________________________
    >
    >
    > * in your form:onload() handler use
    > ______________________________________________________
    >
    > window.setTimeout( "jqinit ()", 500 );
    > ______________________________________________________
    >
    >
    > That should do it.
    >
    > Good luck
    > Wolfgang
    >
    >
    >
    >
    > On 30.01.2015 13:14, dhanarajn wrote:
    >>
    >> I want to keep custom date-picker in the request form. I've gone through
    >> the forums and my understanding are as follows
    >> Created a war file (DC.war) with the below structure and kept js ans css
    >> files.. I've copied that war file into user application server's
    >> /opt/novell/idm/jboss/server/IDMProv/deploy directory.
    >>
    >> DC
    >> resource
    >> javascript
    >> jQuery Theme
    >> jquery.ui.datepicker.js jquery.ui.datepicker.css
    >>
    >> In the Request form I've the following
    >> Form Field Name - input
    >> Data Type - string
    >> Control Type - HTML
    >>
    >> input => propery > content => (function () { return "<input type=text
    >> id=input / >" })()
    >> input => onload => $("#input").focus(function(){ $( "#__input"
    >> ).datepicker();});
    >>
    >> Im referring the Jquery and CSS libraries by scripts => onload => inline
    >>
    >> </script>
    >> <link type="text/css"
    >> href="/DC/resource/javascript/jQuery/themes/jquery.ui.all.css"
    >> rel="stylesheet" />
    >> <link type="text/css"
    >> href="/DC/resource/javascript/jQuery/themes/jquery.ui.datepicker.css"
    >> rel="stylesheet" />
    >> <script type="text/javascript"
    >> src="/DC/resource/javascript/jQuery/jquery.ui.button.js"></script>
    >> <script type="text/javascript"
    >> src="/DC/resource/javascript/jQuery/jquery.ui.position.js"></script>
    >> <script type="text/javascript"
    >> src="/DC/resource/javascript/jQuery/jquery.ui.datepicker.js"></script>
    >> <script>
    >>
    >> When I deploy my PRD, I could see the text box Im not getting what I
    >> wanted to achive ( http://jqueryui.com/datepicker/ )
    >>
    >> Anybody can advise me what Im missing ? am keeping the war file as
    >> expected by user app? is it in the right structure ? Your help would be
    >> much appreciated
    >>
    >> Regards
    >> Nirmal Dhanaraj
    >>
    >>



  • thanks Wolfgang... its working fine ... :) ;)


    --
    dhanarajn
    ------------------------------------------------------------------------
    dhanarajn's Profile: https://forums.netiq.com/member.php?userid=4357
    View this thread: https://forums.netiq.com/showthread.php?t=52701