gismofx / toast_ui.blazor_calendar

Toast UI Calendar Wrapper For Blazor
MIT License
54 stars 8 forks source link

Add JsonIgnore attribute to TUIWeekOptions.daynames #44

Closed aharitovich closed 2 years ago

aharitovich commented 2 years ago

Looks like without the attribute null is passed to ToastUI calendar making it render empty weekly view instead of default.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string[] daynames { get; set; }

A workaround would be to specify daynames if there is a need to setup week options:

var weekOptions = new TUIWeekOptions
{
    daynames = new[] { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" },
    narrowWeekend = true
};
gismofx commented 2 years ago

@aharitovich Thanks. You just want the default English day names applied without having to specify explicitly, right?

An empty array should apply the default English day names. Maybe applying Null/empty in JS is causing it to mess up.

I'll take a look and fix this.

gismofx commented 2 years ago

@aharitovich I pushed a nuget package up. Since we're working on CI/CD build system and it's WIP, the nuget numbering for this patch is out of order.

The one you want to update to is 1.0.0-beta1.1.59