0

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

ebany
  • 296
  • 1
  • 7
  • Could you be more precise: are you using WebWorks, or AIR? eventually post your DatePicker code here... – Smugrik Aug 24 '11 at 15:02
  • For date input, you could use Picker: http://stackoverflow.com/questions/5271966/using-qnx-ui-picker-picker-in-mobile-flex-hero-project-for-blackberry-playbook – Alexander Farber Aug 25 '11 at 11:37

1 Answers1

0

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.

robertc
  • 74,533
  • 18
  • 193
  • 177
  • It was a good idea but the input/change event aren't fired neither in the form when the value changes from the native datePicker. I believe I'll end up changing the type to text and use my own datePicker if the device is a Playbook :(. BTW to catch the change on the iPad I need to catch the blur event, no other event seem to be fired. – ebany Aug 25 '11 at 06:59