日期选择器不应接受小于 Android 中当前日期的过去日期
我正在开发一款类似提醒的应用程序,在这个应用程序中用户可以根据日期创建任务。这里我想限制用户不要选择小于系统当前日期的过去日期。这样用户就不会为过去的日期创建任务。那么,任何人都可以帮我解决这个问题吗?
提前致谢 拉维
I am developing one app like reminder, in this user can create the task according to date. Here I want to restrict the user to not to select the past date which are less then the system current date. So that user wont create the task for the past dates. So, can any one help me out from this.
Thanks in advance
Ravi
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您正在使用日期选择器对话框。如果是这样的话
在
i'm thinking you are using datepicker dialog.if thats right then
in
您可以使用
OnDateSetListener
来实现此目的,如下所示You can achieve this using
OnDateSetListener
like folowing