コード例 #1
0
    public void BitDatePickerCalendarWithCustomCultureInfo()
    {
        Context.JSInterop.Mode = JSRuntimeMode.Loose;
        var component = RenderComponent <BitDatePickerTest>(
            parameters =>
        {
            parameters.Add(p => p.IsOpen, true);
            parameters.Add(p => p.Culture, CultureInfoHelper.GetPersianCultureByFinglishNames());
        });

        var monthButtons = component.FindAll(".month-picker-wrapper .grid-container .btn-row button");

        var index = 0;

        foreach (var button in monthButtons)
        {
            Assert.AreEqual(button.FirstElementChild.TextContent, component.Instance.Culture.DateTimeFormat.AbbreviatedMonthNames[index++]);
        }
    }