I want to have my date field remember my old input

Is there any way i can do this?

**Here's my code**

```
<div class="form-group">
        <label for="date1">Date From: </label>
        <input id="date1" name="date1" type="date"  value="<?php echo date('Y-m-d'); ?>" class="form-control">

    </div>  

<div class="form-group">
        <label for="date2">Date To: </label>
        <input id="date2" name="date2" type="date"  value="<?php echo date('Y-m-d'); ?>" class="form-control">

    </div>  

```

Please Help. Thank You!