I want to use this data picker <https://github.com/richsilv/Pikaday/> in my meteor app.

After clicking in my input-field it should show this data picker. It works only one time, afterwards I get an error and I belive an infinite loop:

> 
> Uncaught RangeError: Maximum call stack size exceeded.
> 
> 
> 

and a lot of console.log messages from:

```
 console.log(this.getMoment().format('YYYY-MM-DD'));

```

What am I doing wrong and how to use this datapicker properly?

**html**

```
{{#each showDates}}
 <li>
  <input class="datapicker" type="text" value={{date}} id="data{{_id}}" />
 </li>
{{each}}

```

**js**

```
'click .datapicker': function(e) {          
    $(document).ready(function() {
        var picker = new Pikaday({
            field: document.getElementById(e.target.id),
            format: 'YYYY-MM-DD',
            onSelect: function() {
                console.log(this.getMoment().format('YYYY-MM-DD'));
            }
        });
    });
},

```

Edit: Maybe an important information: I need to click two times in input field to see this data picker. Then, I have to kill my browser process or to restart my meteor because of this error / infinite loop.