The element <input type="date" /> cannot be activated.
When I click on the fields on the emulator it doesn't show me the entrance date but the android keyboard.
Take a look at this: http://www.quirksmode.org/html5/inputs_mobile.html
It tells you which html5 input types and attributes work on each browser. It looks like the datepicker isn't working for most Androids, and thus it would show as a simple text input.
You could use Trigger.io's UI module to use the native Android date / time picker with a regular HTML5 input. Doing that does require using the overall framework though (so won't work as a regular mobile web page).
You can see before and after screenshots in this blog post:
http://trigger.io/cross-platform-application-development-blog/2012/11/16/new-feature-roundup-native-date-time-picker-analytics-with-flurry-android-events/
Have a look here: How to make the HTML5 input type 'date' trigger the native datepicker on Android?
mobiscroll.com offers a nice polyfill.
Related
I've got an HTML5 INPUT (type="datetime-local") in a WebView, but when I select it, it shows a date-time field that looks like this:
But the same identical element in Chrome looks like this:
This is under Android 7.1, with Chrome v55 installed, so Chrome is being used the WebView component. So, both should show the same thing, right?
I need the latter picker to show up in the WebView, it is much more user friendly (to scroll you can just flick up and down rather than having to repeatedly press the plus or minute buttons.
How do I accomplish this?
Update: I have tried creating this natively using a DatePickerDialog and it does the same thing! I'm targeting minSdkVersion=22, targetSdkVersion=25 (although I have also tried minSdkVersion=25). How do I force Android to display the correct picker for my app?
Update 2: I downloaded a sample app using the native DatePickerDialog and it displays the dialog ok. I don't like the idea of having to try to find the difference between the two projects which is causing the behavioral difference as it could be anything and take an excessive amount of time to find.
Update 3: Using the answer provided by Oleg, I was able to reproduce the second picker using android:Theme.Holo.Light.DarkActionBar. But if I use android:Theme.DeviceDefault.Light I can get a calendar view for input type="date". But the corresponding time picker in the Default theme (the round clock) does not show up for input type="time" and ``input type="datetime-local"` doesn't use the calendar view either.
As discussed in comments, you are likely missing the proper theme. Given that you have access to working app, please apply the same theme, it should solve it
I am working on an Android chatting application. I need to show, a smileys or emoji's keyboard, like that of 'Whats App'. Is there any such default keyboard for Android? If yes, how do I implement it?
This largely depends on what the user currently has installed. I use SwiftKey on my phone so I have the ability to use the Emoji's. If you are willing to put in the effort to create your own Emoji keyboard then toobsco42 has a great basic explanation of the process as well as a link to a repo that you can use.
i would say start by getting the font with all the unicode charset for your application and render them in an layout invoked on the button in your input field.
One of the website to create custom fonts : icomoon.io
I'm using
-webkit-user-modify: read-write-plaintext-only;
on my input fields in my app to prevent several behavior with android ICS but i would like to force the numeric keyboard to show up on specific inputs. And i want to keep the CSS line.
Is there a way to do it ? by modifying some classes in the .java files ? Or maybe is there another way ?
Thanks
On HTML5 (as you're talking on Java mods, I wrote this to be clear):
The only way to trigger the numeric keyboard on Android devices is to use <input type="number"> or <input type="tel">. That comes with some small problems, especially if you're dealing with Angular or with HTML5 native validation, but for the general use this should be no problem.
I am developing a "Nepali Dictionary Android App" using Cordova. Using jQuery I have been able to map the keyboard character to Devnagari. For example If you pressed the 'k' from keyboard 'क' will be displayed in editable text inputs. Now , I am trying to change the keyboard characters so that the users could see Nepali characters in keyboard.
I don't know If it is possible or not, but I think it should be. I am not a java programmer and using cordova api to build the android applications. I am also planning to create MultiKeyboard Phonegap / Cordova Plugin for android (in future ) if It is possible.
My Question is :
How can I change the android keyboard characters for some specific apps ?
WHAT HAVE I TRIED
I have not started coding for this because I don't know if it is possible or not. Please show me the right way.
Thanks.
You could change char value with different value if the given input values will not be used. What i mean is if 'k' will never be used you could catch that input in for example
var tempChar;
variable and swap it's value from a HashMap, but I don't know if you can change the layout of keyboard using PhoneGap only. If you can't do, you can draw your own keyboard using jQuery Mobile if there is way to disable Android keyboard for your app.
I am building a web page for android user, I use a date form control to allow user input the date, but for most devices, it would not pop out the native date selector, but for some Samsung devices like Note2, it can show the native date selector.
I am wondering is this related by android system version? or related with specific android device? How can I detect if current user have that capability to show the date selector?
right now the level of support for the HTML5 <input type="date"> is very varied so I'd suggest using the jQuery/jQueryUI DatePicker as a more reliable solution
Take a look at How to make the HTML5 input type 'date' trigger the native datepicker on Android? I was able to find a way to have the native android datepicker experience within a web app.