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/']
You can use the `minDate` property, like this:

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

```

You can also specify a date, like this:

```
minDate: new Date(), // = today

```
I set starting date using this method, because aforesaid or other codes didn't work for me

```js
$(document).ready(function() {
 $('#dateFrm').datepicker('setStartDate', new Date(yyyy, dd, MM));
 });
```