onSet returning a Number on Mouse selection, an Object on select via Keyboard (pressing enter)
- 主要言語
- JavaScript
- スター
- 7.6k
- フォーク
- 981
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hello,
One of my clients discovered that the date wasn't saved correctly when he was tabbing through a form and selecting the value of the datepicker via the keyboard and pressing enter.
Upon debugging the issue, I noticed that indeed the datepicker supplies different values, depending on whether the keyboard or the mouse was used to trigger the selection:
Code in onSet - callback:
```
onSet: function(context) {
console.log(context, typeof context.select);
}
```
Selecting a date with the mouse returns this:
```
Object {select: 1416355200000} "number"
```
Selecting a date via keyboard returns this:
```
Object {select: Object} "object"
```
The object looks nice, and I can definitely use it, but I just wanted to let you know that it's an issue people who would use onSet: without testing keyboard interaction could stumble about:

Anyways, the datepicker itself is awesome, and very well supported, very professional, I can't thank you enough.
Best wishes
Daniel
コントリビューションガイド
評価
この issue はまだ評価されていません。