How to change nextIcon for antd DatePicker control - antd

I am using antd Date picker control.
I need to change nextIcon and superNextIcon with customIcon.
I am trying as below, but its not changing the icon.
Help is much appreciated.
<DatePicker
superNextIcon={null}
nextIcon={getIcon()}
dropdownClassName="myBookingcalendar"
className="displayFlex myBookingPicker"
showToday={false}
open
dateRender={dateRender}
style={{ visibility: 'hidden' }}
/>

Related

TouchableOpacity only responds with a light touch

I am currently trying to create an app using React native and I have multiple touchable opacity image buttons on different pages. However, whenever I click on any of the touchable opacity image buttons, it will ONLY work with a light tap/touch rather than a normal press on apps. I tried doing hit slop and it still doesn't avoid the issue of a light tap. Can someone please guide me on how to make this work as I have been stuck on this for days.
<TouchableOpacity
onPress={() =>
this.props.navigation.navigate("Track", {
currentDate: this.state.currentDate,
})
}
>
<Image
style={HomeStyles.ovalContainer}
source={require("../../assets/oval.png")}
/>
</TouchableOpacity>
Thank you
You can set the touch opacity
setOpacityTo((value: number), (duration: number));
or you can also try Pressable component for e.g.
<Pressable onPress={onPressFunction}>
<Text>I'm pressable!</Text>
</Pressable>
You can use also TouchableWihoutFeedback
<TouchableWithoutFeedback onPress={() => alert('Pressed!')}>
<MyComponent />
</TouchableWithoutFeedback>;

TextInput with React Native displays a single line

I'm trying to implement two text inputs. I'm not sure if the best practice is to wrap these inside a scroll view or not. However, when I do it as shown below, I just see a single line in the middle.
If I remove the scroll view and just leave a single Text Input, it displays a box with input that I can interact with. Though I'm still unable to get the keyboard to display on the simulator. But I can manually type in and change state.
Any idea on how to allow more than one text input, as well as how to show the native keyboard that pops up from the bottom?
render() {
return (
<ScrollView>
<TextInput
style={{height: 40, borderColor: 'gray', borderWidth: 1}}
placeholder="Enter item 1"
value={this.state.text}
onChangeText={this.onChange} />
<TextInput
style={{height: 40, borderColor: 'gray', borderWidth: 1}}
placeholder="Enter item 2"
value={this.state.text}
onChangeText={this.onChange} />
</ScrollView>
);
}
1 - For the iOS Simulator there is an option Hardware -> Keyboard -> Toggle Software Keyboard (which is unchecked by default). Checking this option should solve your issue of displaying the native keyboard.
2 - Regarding multi-line text input. Yes this is an issue, but there is a work around shared in this answer below. I'll attach the link to the answer for your reference.
P.s: I haven't tried it myself, but the answer has been marked to have solved the issue!
Multi-Line TextInput Hack - https://stackoverflow.com/a/31759113/5783646
Display keyboard in iOS Simulator: Hardware -> Keyboard -> Toggle Software Keyboard
Show more than one text input: My guess is that there are styles applied (or not applied) to a parent element or elsewhere that is preventing the TextInput from rendering at a useable size.
I created an example on RN Playground that demonstrates what you are asking for: https://rnplay.org/apps/ldlfWw

Adding border only to the one side of the <Text/> component in React Native (iOS)

I am facing something weird issue with React-Native's <Text/> component in iOS.
I wanted to apply borderBottomWidth style into <Text/> component but it did NOT work. However, the borderWidth option worked.
Worked
<Text style={{borderWidth:1}}> React Native </Text>
NOT Worked
<Text style={{borderBottomWidth:1}}> React Native </Text>
Is there any way to only apply bottom level border into the <Text/> component?
Thank you!
Note:
I am aware of following mentioned approaches in order to achieve this but in my case, I required to apply the style only to the <Text/> component.
We can try wrapping <View/> to the <Text/> and apply borderBottomWidth style to the <View/>. (borderBottomWidth works fine with <View/>)
Adding such <View/> just below to the <Text/> component which can look like a line.
Even though borderBottom doesn't work on the Text component, it did work for me on the TextInput component, just set editable to false and set the value to your desired text as so...
<TextInput
style={styles.textInput}
editable={false}
value={'My Text'}/>
const styles = StyleSheet.create({
textInput: {
borderBottomColor: 'black',
borderBottomWidth: 1,
}
});
This isn't currently possible. See the following RN issue: https://github.com/facebook/react-native/issues/29 and this ticket on Product Pains: https://productpains.com/post/react-native/add-borderwidth-left-right-top-bottom-to-textinput-/
We can now use :
const styles = StyleSheet.create({
textZone: {
borderTopRightRadius: 10,
borderTopLeftRadius: 10,
borderBottomRightRadius: 10,
borderBottomLeftRadius: 10
},
})

Kendo UI Tooltip Bugs

I have few bugs while using the tooltip from KENDO UI. I wanted to show help message for my input fields and so I set the position of tooltip to the right but it shows towards the top right corner of the input field.
Moreover when I bring the mouse over the input field the title of the page changes.
If I am setting
autoClose: false
then there are 2 X buttons in the tooltip.
Sample markup and javascripts
<input type="text" title="Please enter firstname." id="txtFirstname" />
$("#txtFirstname").kendoTooltip({
autoHide: false,
callout: false,
showOn: "focus",
position:"right"
});
Please help to fix these bugs
Thanks
Prabhanjan
I think those issues were addressed in Q1 2013 SP1 (version 2013.1.514) - May 2013 release.
Here are release notes about tooltip of that release:
Fixed: Document title is removed when tooltip is open
Fixed: Tooltip content is not cleared when its title attribute is missing and it
was shown for another target
Have you tried to use new version?

tooltip not working

I'm using this code in *.xul
<tooltip id="tt">
<label value="additional information"/>
</tooltip>
<statusbar id="status-bar">
<statusbarpanel id="mypanel" tooltip="tt"
label="my panel"
/>
</statusbar>
I don't know why but when I'm over mypanel with mouse. There is no popup window with "additional information"
thank you for help
I'm not sure, but this might be because the <tooltip> element needs to be inside of a <popupset> element. By the way, you shouldn't use the statusbar anymore; use the add-on bar instead: https://developer.mozilla.org/en/The_add-on_bar

Resources