开发者

Playbook input type date change event

I'm trying to make use of the input type date开发者_运维技巧 on playbook, and it seems that no events are sent when a date is selected in the date picker.

Hence I cannot do any validation on that date.

Does anybody know if any event is sent when the input value is changed with the datepicker?

Edit: I'm developing a tablet webapp in html, the datepicker is the native one that appear in the browser.

<input type="date" />

I want to show the native datepicker when possible (iOs 5+, Playbook, ..) and a home brewed datepicker for other touch devices


The events that should be fired are input and change. I don't have access to a Playbook or an iOS 5 device, but this example works in Opera (which has also implemented native date pickers).

<form oninput="date_diff()">
    <label for="date1">First date:</label>
    <input id="date1" type="date" value="2011-08-24">
    <label for="date2">Second date:</label>
    <input id="date2" type="date" value="2011-08-25">
</form>

The date_diff function gets executed whenever one of the date values is changed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜