Question: I'm designing a page that is supposed to allow users to submit possible computing science projects and at one stage the user will have to enter a duration that the project will run over. To make things easier on the user the I'm trying to fill out the from: to: fields using jQuery's datepicker method however I cannot get the script to run when the user selects the appropriate field.

So far I've got the following script:

```
<h:outputScript library="jquery" name="jquery-1.9.1.js"/>
<h:outputScript library="jquery" name="jquery-ui-1.10.3.custom.js"/>
<h:outputScript library="jquery" name="jquery-ui-1.10.3.custom.min.js"/>

<h:head>
    <title>Add project</title>

    <script type="text/javascript" id="setDate">
        $(function() {
            $(" #datepicker ").datepicker();
        });
    </script>
    <!-- rest omitted for readability -->

```

and my h:inputText looks like this:

```
<h:inputText id="setDate" value="" onclick="$('#datepicker').datepicker();"/>
<p>Date: <input type="text" id="datepicker" /></p>

```

I did try to make it work without using any jsf tags and managed to get it up and running but I just can seem to make it work with jsf tags.

The problem is that when in a browser the jQuery datepicker widget does not display upon clicking on the field. Clicking on the field defined using the standard `<input>` tag works correctly.

Any help is greatly appreciated, thanks.

Answer: 
Here You can declare the two buttons in the layout files of `myediteddialog.xml` 

```
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="150dp"
android:orientation="vertical"
android:background="@drawable/delete"
 >

<TextView
    android:id="@+id/editeddialogboxtextview"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textColor="@android:color/background_dark"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:text="Do You Want To Delete?"
    android:textAppearance="?android:attr/textAppearanceMedium" />

<Button
        android:id="@+id/stopButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="ffffff"
       android:text="Yes" />

    <Button
        android:id="@+id/playButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
         android:background="ffffff"
        android:text="No" />

</RelativeLayout>

```
As per your requirement u have to design custom dialog layout this layout contains one textview and 2 buttons which look as default alert dialog. and write listeners for two buttons and design buttons according to your requirement .