You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm starting to use a pattern like this frequently. The reason being there are multiple date-pickers in Scheduler and if you use a component instead of just another object of props you get code completion, etc. and the consuming engineer doesn't need to go look the prop up on the doc site.
Maybe it's a type of HOC pattern, because typically the Datepicker component just gets discarded by Scheduler and the props are stolen. Any naming suggestions?
"Grandfather steals from grandprops" doesn't fly off the tongue that easily. 😄
<Scheduler
datepickerSharedProps={<Datepicker
assistiveText={{
openCalendar: 'Open Calendar',
nextMonth: 'Next month',
previousMonth: 'Previous month'
}}
formatter={(date) => {
let inputText = '';
/* Make American or the Entire Rest of the World format here. */
if (date) {
inputText = `${date.getMonth() + 1}/${date.getDate()}/${date.getFullYear()}`;
}
return inputText;
}}
/>}
/>
Maybe Child Component Proxy?
The text was updated successfully, but these errors were encountered:
I'm starting to use a pattern like this frequently. The reason being there are multiple date-pickers in
Scheduler
and if you use a component instead of just another object of props you get code completion, etc. and the consuming engineer doesn't need to go look the prop up on the doc site.Maybe it's a type of HOC pattern, because typically the
Datepicker
component just gets discarded byScheduler
and the props are stolen. Any naming suggestions?"Grandfather steals from grandprops" doesn't fly off the tongue that easily. 😄
Maybe Child Component Proxy?
The text was updated successfully, but these errors were encountered: