This is my code and it is not working correctly. I want to set `minDate` to the current date. How can I do it?

```
$("input.DateFrom").datepicker({
    changeMonth: true, 
    changeYear: true, 
    dateFormat: 'yy-mm-dd',
    maxDate: 'today',
    onSelect: function(dateText) {
        $sD = new Date(dateText);
        $("input#DateTo").datepicker('option', 'minDate', min);
    }

```
['https://Stackoverflow.com/questions/14810602', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1305280/']
Use this one :

```
 onSelect: function(dateText) {
                 $("input#DateTo").datepicker('option', 'minDate', dateText);
            }

```

This may be useful :
<http://jsfiddle.net/injulkarnilesh/xNeTe/>
**Set minDate to current date in jQuery Datepicker :**

```
$("input.DateFrom").datepicker({
    minDate: new Date()
});

```