I've started a Turbolinks android application and have a form that requires a date input.
<form>
Birthday:
<input type="date" name="bday">
<input type="submit">
</form>
The problem is that when I touch on the date input field it doesn't present the native android date picker which is odd because when I load the page inside the Chrome browser on the device it does..
I know that android WebViews only support these kind of HTML5 inputs from API version 19 onwards, so I've setup my application as such:
app/build.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.myapp.turbolinks.app"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
postprocessing {
removeUnusedCode false
removeUnusedResources false
obfuscate false
optimizeCode false
proguardFile 'proguard-rules.pro'
}
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'com.basecamp:turbolinks:1.0.7'
}
repositories {
jcenter()
}
I'm not using any CSS or JS libraries that could interfere either.
I've also checked that emulator uses the Chrome web view implementation.
I've tested it with type="datetime"
and type="time"
which don't work either.
I'd appreciated any help on this. Maybe I've missed something?
Thanks.