Answer the question
In order to leave comments, you need to log in
Anyone familiar with the wix-react-native calendar?
In general, there is a library for calendars in react-native from wix :
https://github.com/wix/react-native-calendars
There is an opportunity to create a custom ( day component ) component for each number, for example, I created:
const currentDate = new Date().toISOString().slice(0, 10);
<Calendar
markingType={'custom'}
markedDates={{
[currentDate]: {
marked: true,
dotColor: THEME.INDIGO_COLOR,
customStyles: {text: {fontFamily: 'Inter-SemiBold'}}
}
}}
dayComponent={(props) => (
<DayComponent {...props} navigation={navigation}/>)} />
import React from 'react';
import PropTypes from 'prop-types';
import Today from "./Today";
const DayComponent = ({date, state, marking}, navigation) => {
const onDayPress = date => {
navigation.navigate("JobOffer", {date: date})
};
switch (marking) {
case 'today': {
return <Today date={date} onPressCallback={onDayPress}/>
}
}
}
DayComponent.propTypes = {
date: PropTypes.any,
state: PropTypes.any,
marking: PropTypes.any,
navigation: PropTypes.object,
}
export default React.memo(DayComponent)
Answer the question
In order to leave comments, you need to log in
did the support load them? if a paid package - load safely, they answer
Faced with the fact that when you clicked on the day, it was not marked, I did marking there and in order for everything to work, I had to make a loader and re-render
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question