Custom today text

Asked by Anonymous
1 years ago.

How do we change the Today button text based on the culture

Comment posted by Anonymous
1 years ago.

We thought may be it should be defined in the culture definitions.

Answer posted by Dan Letecky [DayPilot]
1 years ago.

I assume you mean the DayPilot.DatePicker component.

In the latest sandbox build (2025.3.6533), you can now set a custom text of the “Today” button using the todayText property:

const picker = new DayPilot.DatePicker({
    target: 'start',
    pattern: 'yyyy-MM-dd',
    todayText: "Today",
    onTimeRangeSelected: args => {
        dp.startDate = args.start;
        dp.update();
    }
});

At this moment, the locale is limited to date/time properties so this is available as a separate option.

Comment posted by Anonymous
1 years ago.

It would be great if it could be within the locale class so we don’t have to keep setting it based on different locales.

Thanks

Comment posted by Dan Letecky [DayPilot]
1 years ago.

As I mentioned, the Local class is shared for all components and it is limited to date/time formatting - just like the .NET culture.

This question is more than 1 month old and has been closed. Please create a new question if you have anything to add.