Skip to content
This repository has been archived by the owner on Aug 9, 2019. It is now read-only.

iOS 7 - End Results Always Have Date and Time. #47

Open
MartynJH opened this issue Jan 15, 2014 · 0 comments
Open

iOS 7 - End Results Always Have Date and Time. #47

MartynJH opened this issue Jan 15, 2014 · 0 comments

Comments

@MartynJH
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant