gismofx / toast_ui.blazor_calendar

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

Define a month in calendaroptions generate a error #13

Closed ezequielmerecias closed 2 years ago

ezequielmerecias commented 2 years ago

//Set the Calendar Options CalendarOptions = new TUICalendarOptions() { useCreationPopup = true, useDetailPopup = true, week = new TUIWeekOptions() { hourEnd = 24, hourStart = 0, daynames = new string[] { "Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado" }, startDayOfWeek = 1 }, month = new TUIMonthOptions() { daynames = new string[] { "Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado" }, startDayOfWeek = 1, narrowWeekend = true }, ...

When you want to initialize a Month, when you change ViewModel.CalendarViewName generate a error.

gismofx commented 2 years ago

Thanks! Error in c# or in JS? Can you please share exact steps to reproduce error?

I'll take a look at this tomorrow and try to fix.

ezequielmerecias commented 2 years ago

In c# when you define the props in Month when calendar loaded crashed. If you don't define a Month the calendar works fine.

ezequielmerecias commented 2 years ago

I worked with Calendar in Js and works without any problem .

gismofx commented 2 years ago

@ezequielmerecias I found the issue. Some properties in TUIMonthOptions, if they are not defined(i.e. null), cannot explicitly be null in the TUI JS side, they must be undefined. I am working on a custom JsonConverter for these properties so they are not sent to JS side via the interop. Stay tuned..

gismofx commented 2 years ago

@ezequielmerecias Problem resolved! I'll push and update and NuGet soon and tag you. image

sanongpost commented 2 years ago

@gismofx I am using your calendar in Blazor, Beta version Install-Package toast_ui.blazor_calendar -Version 1.0.0-beta1.4

I am facing -When click to add schedule. the dialog layout is not inline, with picture of locker appear. I cannot get rid of it. -How can I intercept click-event/ save event in order to save calendar schedule

Pls advise / sanongpost@hotmail.com

UI_Calendar

gismofx commented 2 years ago

@sanongpost Please create new issue(s) for your two questions. Your second question is solved by using the EventCallbacks in the TUICalendar Component. Have a look here: https://github.com/gismofx/toast_ui.blazor_calendar/blob/acd6dcc45b23481fb41d008bbd8fedb198db8eca/toast_ui.blazor_calendar/TUICalendar.razor.cs#L78

sanongpost commented 2 years ago

Hi..

I have opened new issue.

Pls advise.

Regards

Sanong

From: gismofx @.> Sent: Sunday, March 6, 2022 7:20 PM To: gismofx/toast_ui.blazor_calendar @.> Cc: sanongpost @.>; Mention @.> Subject: Re: [gismofx/toast_ui.blazor_calendar] Define a month in calendaroptions generate a error (Issue #13)

@sanongpost https://github.com/sanongpost Please create new issue(s) for your two questions. Your second question is solved by using the EventCallbacks in the TUICalendar Component. Have a look here: https://github.com/gismofx/toast_ui.blazor_calendar/blob/acd6dcc45b23481fb41d008bbd8fedb198db8eca/toast_ui.blazor_calendar/TUICalendar.razor.cs#L78

— Reply to this email directly, view it on GitHub https://github.com/gismofx/toast_ui.blazor_calendar/issues/13#issuecomment-1059952716 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ALRIKFVZYK76NS3EZ56M5YTU6SPIHANCNFSM5LK5CMIQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . You are receiving this because you were mentioned. https://github.com/notifications/beacon/ALRIKFT7N5RAI4QKKSCD7VDU6SPIHA5CNFSM5LK5CMI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOH4WZQTA.gif Message ID: @. @.> >