Our flexible Kanban board for managing tasks with drag drop


Post by kiyoshi »

I'm trying to set a default value if startDate and endDate doesn't exist on the value. I've tried it on my code, but didn't worked.
On my code if the value exists it return the date formated correctly, but if doesn't exist it returns nothing (It must return "-" on startDate or endDate)

      footerItems: {
        startDate: {
          type: "template",
          template: ({ value }: any) => {
            console.log(value);
            const formattedStartDate = value ? DateHelper.format(value, "DD/MM/YYYY") : "-";
            return `<div> "startDate:" </div> ${formattedStartDate}`;
          },
        },
        endDate: {
          type: "template",
          template: ({ value }: any) => {
            const formattedEndDate = value ? DateHelper.format(value, "DD/MM/YYYY") : "-";
            return `<div> "endDate:" </div> ${formattedEndDate}`;
          },
        },
      },

Post by johan.isaksson »

Hi,

Card items that have a backing value of null or undefined are currently not rendered. Your usecase makes sense though, so I have opened a ticket on allowing it: https://github.com/bryntum/support/issues/7625

Best regards,
Johan Isaksson

Post by kiyoshi »

Thank you so much!


Post Reply