You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 9, 2019. It is now read-only.
I'm currently trying to add a date only picker for an iOS 7 app. I've set the display mode as DATE. When I use it on the device only the date picker will show, which is good. However, when I click OK, the date I choose PLUS the current device's time is displayed in the text field.
var chosenDate:String;
protected function showDatePicker(e:MouseEvent):void
{
var d:NativeDatePickerDialog = new NativeDatePickerDialog();
d.addEventListener(NativeDialogEvent.CLOSED,onCloseDialog);
d.addEventListener(NativeDialogEvent.CANCELED,trace);
d.addEventListener(NativeDialogEvent.OPENED,trace);
d.addEventListener(Event.CHANGE,function(event:Event):void
{
var n:NativeDatePickerDialog = NativeDatePickerDialog(event.target);
chosenDate = String(n.date);
});
d.buttons = Vector. (["OK"]);
d.displayMode = NativeDatePickerDialog.DISPLAY_MODE_DATE;
d.title = "DatePicker";
d.message = "Select date:";
d.show(false);
}
private function onCloseDialog(event:NativeDialogEvent):void
{
var m:iNativeDialog = iNativeDialog(event.target);
m.removeEventListener(NativeDialogEvent.CLOSED,onCloseDialog);
trace(event);
m.dispose();//Must be called if not used again
if (currentPage == 1 ){
editPage.edit_date.text = chosenDate;
}
}
Is there a parameter I'm missing? I've looked over the documents but I can not find anything that could make this happen.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm currently trying to add a date only picker for an iOS 7 app. I've set the display mode as DATE. When I use it on the device only the date picker will show, which is good. However, when I click OK, the date I choose PLUS the current device's time is displayed in the text field.
var chosenDate:String;
protected function showDatePicker(e:MouseEvent):void
{
var d:NativeDatePickerDialog = new NativeDatePickerDialog();
d.addEventListener(NativeDialogEvent.CLOSED,onCloseDialog);
d.addEventListener(NativeDialogEvent.CANCELED,trace);
d.addEventListener(NativeDialogEvent.OPENED,trace);
d.addEventListener(Event.CHANGE,function(event:Event):void
{
var n:NativeDatePickerDialog = NativeDatePickerDialog(event.target);
chosenDate = String(n.date);
});
d.buttons = Vector. (["OK"]);
d.displayMode = NativeDatePickerDialog.DISPLAY_MODE_DATE;
d.title = "DatePicker";
d.message = "Select date:";
d.show(false);
}
private function onCloseDialog(event:NativeDialogEvent):void
{
var m:iNativeDialog = iNativeDialog(event.target);
m.removeEventListener(NativeDialogEvent.CLOSED,onCloseDialog);
trace(event);
m.dispose();//Must be called if not used again
}
Is there a parameter I'm missing? I've looked over the documents but I can not find anything that could make this happen.
The text was updated successfully, but these errors were encountered: