在iOS Phonegap App中限制本机日期选择器中的可选日期 [英] Limit the selectable dates in native datepicker in iOS Phonegap App

查看:147
本文介绍了在iOS Phonegap App中限制本机日期选择器中的可选日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Phonegap Build iOS 开发应用程序,我正在使用输入数据类型调用本机日期选择器(没有问题),然后选择一些日期,但我想限制可选择的日期。

I'm developing an App for iOS with Phonegap Build and I'm using an input data type to call the native datepicker (without problems) and select some dates, but I want limit the selectable dates.

我尝试过 min max 输入的属性,但会被忽略。已在iOS 6和iOS 7上测试。

I've tried with the min and max attributes of the input, but are ignored. Tested on iOS 6 and iOS 7.

以下是我的代码:

<input id="fecha-buscar" type="date" min="2014-01-01" max="2014-12-31" value="2014-01-01">

我发现这个类似的SO问题,但没有回答。

任何想法如何解决这个问题?可以修复< input type =date>的 min max 属性;

Any idea how solve this? Can be fixing the min and max attributes of <input type="date"> or other way but calling the native datepicker of iOS.

感谢!

推荐答案

我刚刚发现一个datepicker插件phonegap / cordova,它有选项min&最大值。
https://github.com/sectore/phonegap3-ios -datepicker-plugin / tree / ios7

I just found a datepicker plugin for phonegap/cordova and it has options for min & max values. https://github.com/sectore/phonegap3-ios-datepicker-plugin/tree/ios7

这篇关于在iOS Phonegap App中限制本机日期选择器中的可选日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆