Question: I'm following the instructions here: <https://developer.android.com/guide/topics/ui/controls/pickers.html>

I scrolled down to "Creating a Date Picker" and copy pasted this code in a file called `DatePickerFragment.java`:

```
public static class DatePickerFragment extends DialogFragment
                            implements DatePickerDialog.OnDateSetListener {

    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        // Use the current date as the default date in the picker
        final Calendar c = Calendar.getInstance();
        int year = c.get(Calendar.YEAR);
        int month = c.get(Calendar.MONTH);
        int day = c.get(Calendar.DAY_OF_MONTH);

        // Create a new instance of DatePickerDialog and return it
        return new DatePickerDialog(getActivity(), this, year, month, day);
    }

    public void onDateSet(DatePicker view, int year, int month, int day) {
        // Do something with the date chosen by the user
    }
}

```

I then created this button in `activity_front_page.xml`:

```
<Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/pick_date"
    android:onClick="showDatePickerDialog" />

```

and added this code to the `DatePickerFramegent` class:

```
public void showDatePickerDialog(View v) {
    DialogFragment newFragment = new DatePickerFragment();
    newFragment.show(getSupportFragmentManager(), "datePicker");
}

```

But it is saying that `getSupportFrammentManager()` is not defined?

I'm new to using Android studio and developing for Andriod. What I want is the date picker (a picture of it is shown near the top of the screen if you access the link provided above). Any idea how to fix this issue?

Answer: 
Here is another way it can be done .

```
function showData(m)
{
    let x ="<div> added from js ";
    let y = m.toString();
    let z = "</div>";
    let htmlData = x+y+z ;
    content.insertAdjacentHTML("beforeend",htmlData);
}

```
You can do the same on document `ready` event like below

```
<script>
$(document).ready(function(){
 var number = 112;
    $("yourClass/Element/id...").html(number);
// $("yourClass/Element/id...").text(number);
});
</script>

```

or you can simply do it using `document.write(number);`.