date picker not appearing when cursor is put in te

2019-09-15 16:43发布

I have two date pickers appearing when green color is clicked, but when i am putting mouse cursor on those two text boxes, then nothing appears, only after clicking image/green color date picker is appearing. What modification should i do?

In this below fiddle automatically date picker is appearing when cursor is put:

http://jsfiddle.net/cBwEK/

I want to add the above function in below fiddle:

http://jsbin.com/unosar/19/edit#javascript,html,live

I am trying but nothing happens. Any solution please

EDIT: BOTH THESE ABOVE EXAMPLES USE SAME css/js/mootools SCRIPTS

2条回答
叛逆
2楼-- · 2019-09-15 17:28

The code in the two examples are different. Try to set up an example that is more like your real code. Try to do the same thing in the 2nd example:

new DatePicker('.picker', {
     pickerClass: 'picker ',
    allowEmpty: true
});

查看更多
Summer. ? 凉城
3楼-- · 2019-09-15 17:36

Add an click event on the textboxes:

$$('.date').addEvent('click', function() { 
      dp.show(); 
});
查看更多
登录 后发表回答