Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work on Blazor Server-side (Dotnet 9) #99

Open
aliajboy opened this issue Feb 9, 2025 · 3 comments
Open

Doesn't work on Blazor Server-side (Dotnet 9) #99

aliajboy opened this issue Feb 9, 2025 · 3 comments

Comments

@aliajboy
Copy link

aliajboy commented Feb 9, 2025

Hi,
for your testing (as I have done) you can:
1- create a new blazor webapp project (server-side)
2- add Blazor.PersianDatePicker Nuget
3- add js and css you specified in App.Razor
4- your sample component code in Home.razor
5- tadaaaaa... It will show the input and placeholder with the classes specified but after you click, nothing will show.

thanks

@farshaddavoudi
Copy link
Owner

Hi @aliajboy
Thanks for providing the steps to reproduce the bug.
I'll test it and let you know ASAP.

@farshaddavoudi
Copy link
Owner

farshaddavoudi commented Feb 11, 2025

@aliajboy

I've done these steps:

  1. Create a new Blazor WebApp project in server-side mode

Image

  1. Install Nuget package (obvious)
  2. Add JS and CSS refs to App.razor file as below:

Image

  1. Add Using to _imports.razor

Image

  1. Add sample code in Home.razor
@page "/"

<PageTitle>Home</PageTitle>

<h1>Hello, world!</h1>

Welcome to your new app.

<InputPersianDatePicker Id="myInputDatePicker"
                        @bind-Value="_variable4"
                        Name="myInputName"
                        Visible="true"
                        Disabled="false"
                        PickerAlign="Align.Right"
                        PickerOffsetTopPositionInPixels="1"
                        InitialValueSetOnToday="false"
                        CalendarType="Calendar.SingleModeJalali"
                        DigitType="DigitType.BasedOnCalendar"
                        DateFormat="DateFormat.yyyy_slash_MM_slash_dd"
                        MinDateSetOnToday="true"
                        Placeholder="Select date"
                        CssClass="form-control"
                        Style="border:1px solid green; width:20%; float:right"
                        Theme="PickerTheme.RedBlack"
                        MarkHolidays="true"
                        MarkedDates="@(["1403-06-25", "1403/06/27", "1403/06/28"])"
                        OnChange="@(() => Console.WriteLine("OK"))" />
                        
@code {

    private string _variable4;

}
  1. Run the app and it works

Image

@farshaddavoudi
Copy link
Owner

Please try again once more and let me know if the issue persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants