I am using the solution provided on [How display only years in input Bootstrap Datepicker?](https://stackoverflow.com/questions/13128701/how-display-only-years-in-input-bootstrap-datepicker) to show only years on datepicker. 

Live [DEMO](http://jsfiddle.net/rp1kz6yb/2/)

My datepicker has the following configuration:

```
$("#datepicker").datepicker( {
    format: " yyyy", // Notice the Extra space at the beginning
    viewMode: "years", 
    minViewMode: "years"
});

```

I've tried to set `endDate: '0d'` and it didn't work.

How can I set an endDate which will prevent me from selecting a future year using that solution?