@@ -2,7 +2,7 @@ import { ObjectItem } from "mendix";
22import { DateLocalizer , Formats , ViewsProps } from "react-big-calendar" ;
33import { CalendarContainerProps } from "../../typings/CalendarProps" ;
44import { createConfigurableToolbar , CustomToolbar , ResolvedToolbarItem } from "../components/Toolbar" ;
5- import { eventPropGetter } from "../utils/calendar-utils" ;
5+ import { eventPropGetter , getTextValue } from "../utils/calendar-utils" ;
66import { CalendarEvent , DragAndDropCalendarProps } from "../utils/typings" ;
77import { CustomWeekController } from "./CustomWeekController" ;
88
@@ -318,21 +318,22 @@ export class CalendarPropsBuilder {
318318 if ( ! items || items . length === 0 ) {
319319 return undefined ;
320320 }
321+
321322 return items . map ( i => ( {
322323 itemType : i . itemType ,
323324 position : i . position ,
324- caption : i . caption ?. value ,
325+ caption : getTextValue ( i . caption ?. value ) ,
325326 renderMode : i . renderMode ,
326- customButtonTooltip : i . buttonTooltip ?. value ,
327+ customButtonTooltip : getTextValue ( i . buttonTooltip ?. value ) ,
327328 customButtonStyle : i . buttonStyle ,
328- customViewHeaderDayFormat : i . customViewHeaderDayFormat ?. value ,
329- customViewCellDateFormat : i . customViewCellDateFormat ?. value ,
330- customViewGutterTimeFormat : i . customViewGutterTimeFormat ?. value ,
331- customViewGutterDateFormat : i . customViewGutterDateFormat ?. value ,
332- customViewAllDayText : i . customViewAllDayText ?. value ,
333- customViewTextHeaderDate : i . customViewTextHeaderDate ?. value ,
334- customViewTextHeaderTime : i . customViewTextHeaderTime ?. value ,
335- customViewTextHeaderEvent : i . customViewTextHeaderEvent ?. value
329+ customViewHeaderDayFormat : getTextValue ( i . customViewHeaderDayFormat ?. value ) ,
330+ customViewCellDateFormat : getTextValue ( i . customViewCellDateFormat ?. value ) ,
331+ customViewGutterTimeFormat : getTextValue ( i . customViewGutterTimeFormat ?. value ) ,
332+ customViewGutterDateFormat : getTextValue ( i . customViewGutterDateFormat ?. value ) ,
333+ customViewAllDayText : getTextValue ( i . customViewAllDayText ?. value ) ,
334+ customViewTextHeaderDate : getTextValue ( i . customViewTextHeaderDate ?. value ) ,
335+ customViewTextHeaderTime : getTextValue ( i . customViewTextHeaderTime ?. value ) ,
336+ customViewTextHeaderEvent : getTextValue ( i . customViewTextHeaderEvent ?. value )
336337 } ) ) ;
337338 }
338339}
0 commit comments