黑莓:内置日期选择器 API?
在我的应用程序屏幕中,我有一个字段,用户可以在其中选择他的出生日期。 我想向用户弹出任何内置的“日期”日历或一些内置的日期选择器,以便它看起来很专业。由于我是此开发的新手,我想知道是否有任何代码示例可用于弹出内置日期选择器? 注意:我还想在用户选择日期后将其存储在现有的持久存储中。
感谢您的建议。
In my application screen, i am having a field, where user can to choose his DateOfBirth.
I want to popup any built-in "Date" calendar or some built-in Date picker to user, so that it will look professional. As i'm new to this development, i wanted to know there is any code sample available to popoup the built-in Date Picker?
Note: I also want to store the selectable Date by user after selecting it in my existing persistent storage.
Thank you for your suggestions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于本机日期选择器,您可以使用 DateField,例如:
如果您希望“弹出”它,则必须将其添加到对话框中,除非有本机组件可以执行此操作。然后,您可以查询该字段的日期,它返回一个日期对象:
请参阅 日期字段
For a native date picker, you can use the DateField, such as:
If you want this to 'pop up' you will have to add this to a dialog, unless there is a native component to do this. You can then query this field for its date, it returns a date object:
See Date Field
您可能想使用
DateTimePicker
。这样,您就不必经历创建DateField
并将其添加到Dialog
的麻烦。You probably want to use
DateTimePicker
. That way you don't have to go through the hassle of creating aDateField
and adding it to aDialog
.