UIWebView DatePicker Input Detection - ios

I have a UIWebView and I'd like to use the internal datepicker on iOS that is used when I have the <input type=date> tag.
I have some UIViews in iOS that I want to modify based on if that input changes.
How do I detect this change? I'm hoping there is a delegate I can use but based on my research, that doesn't seem possible.

If I understand you correctly, you want to catch datepicker value changed event? If it is, you can simply create IBAction method and connect it to datepicker valueChanged event in interface builder.

This may can help you
Invoke native date picker from web-app on iOS/Android
There are some plugins that simulates the uidatepicker style in javascript.

Related

How to disable react-native-datetimepicker in ios?

I am using react-native-datetimepicker (#react-native-community/datetimepicker) for my android/ios app. I need to disable user from changing the date for some occasions.
In android since picker is only modal, anyway I have to show a label with date and I can disable user with onPress method logic.
But in ios a default label is given from the picker component and I need to disable it. I found following discussion on disabling the underlying ios component - Disable / Enable UIDatepicker
I need to disable ios picker from react-native-datetimepicker/datetimepicker library.

Button inside react-native-webview

I am trying to implement functionality which allows user to press on an image, that is part of an html which is opened with webview in react-native and then the image will be zoomed. What would be the best way to achieve this functionality?
This property injectedjavascript should help you. You can inject your own js code, with this prop you can programmatically, add the onclick function to your image.

Can you reuse the 'clear' button graphic (circle with an 'x' in it) from a UITextField in your own custom control?

We have a custom date picker control that we want the user to be able to clear, the same way they clear a UITextField. However, we can't find the graphic representing the clear button. Is that available to be used elsewhere?
Update: We are using iOS 12 so we can't use xmark.circle.fill as suggested below as it appears that's only for iOS 13 and later.
We were originally thinking to just use a UITextField but we don't want the user to be able to interact with it at all except for clearing the value. (When you tap on it, we display a date picker UI.)
So is this graphic available?
Have you tried using the system image "xmark.circle" or "xmark.circle.fill"? This might be what you are looking for. Just change the tint to what works for you.
xmark.circle.fill

noUiSlider or jQuery Slider - Force user to slide the handle only

I have not found a configuration option in the docs for either widget, but is there a way to implement the noUiSlider or jQuery UI Slider to provide this functionality in a localized way (localized = allow default functionality where needed in other sections of the DOM):
User must click and drag the handle to set a value
User cannot click on the bar to set the value -> value not set to where user clicked
This is for a business requirement, and while I don't mind learning how to re-write a slider from scratch in vanilla JS, it is quite nice to use well-supported widgets. Thanks in advance.
You can do this in noUiSlider by setting behaviour: 'none'. See the documentation for more info.

when using UIWebview and dropdown, ios7 picker doesn't wrap the text.

I have an application that uses Webview in iOS7. I was wondering if there is anyway via CSS or HTML to tell the picker to wrap the text instead of showing "...". iOS 6 would wrap the text but in IOS 7 the text gets ... after 25 characters.
Thanks,
Faraz
I fear that's not possible.
The Webkit used in the UIWebview uses the same UIPickerView as native apps, and there's no way to customise it via CSS nor JS etc.
It looks like the ellipsis it adds in the text is the new behaviour of UIPickerView itself in iOS7.
If you really need to customise the picker, you should implement one in HTML, CSS, JS etc, by yourself.
If think it worth the effort, you should also take a look at Sencha Touch's picker.

Resources