From 9806a21f48c56b1ede4ea1e474d471d43b4bacc3 Mon Sep 17 00:00:00 2001 From: markosteger Date: Thu, 16 Mar 2023 14:09:47 +0100 Subject: [PATCH] Datepicker fix, NumberInput fix, ToggleGlyphButton fix --- .../Pages/Index.razor | 24 +- .../Components/DatePicker.razor | 12 +- .../Components/DatePicker.razor.cs | 33 +-- .../Components/FormWizard.razor | 3 +- .../Components/NumberInput.razor | 50 ++-- .../Components/NumberInput.razor.cs | 213 ++++++++++-------- .../Components/NumberStepper.razor | 2 +- .../Components/ToggleGlyphButton.razor | 4 +- .../Components/ToggleGlyphButton.razor.cs | 10 + .../Connected.Components.csproj | 2 +- 10 files changed, 205 insertions(+), 148 deletions(-) diff --git a/src/Connected.Components.Showcase.Runner/Pages/Index.razor b/src/Connected.Components.Showcase.Runner/Pages/Index.razor index 3a7dd11..4183816 100644 --- a/src/Connected.Components.Showcase.Runner/Pages/Index.razor +++ b/src/Connected.Components.Showcase.Runner/Pages/Index.razor @@ -36,20 +36,36 @@ Step4 - + - + + + + +

Selected date is @date.ToString()

Number is: @number.ToString()

+

DNumber is: @dnumber.ToString()

@code { DateTime date = DateTime.Today; + double dnumber = 0; + int number = 0; + + string ErrorText = ""; + + public void ChangeErrorText() + { + if (string.IsNullOrEmpty(ErrorText)) + ErrorText = "Test string: Error has ocurred!"; + else + ErrorText = string.Empty; + //StateHasChanged(); + } } \ No newline at end of file diff --git a/src/Connected.Components/Components/DatePicker.razor b/src/Connected.Components/Components/DatePicker.razor index b1e13ff..763b407 100644 --- a/src/Connected.Components/Components/DatePicker.razor +++ b/src/Connected.Components/Components/DatePicker.razor @@ -5,9 +5,9 @@
- -
Some helping Text
-
At least 6 characters required
+ +
@HelperText
+
@ErrorText
@@ -20,7 +20,6 @@
- @if (Shown) { @@ -96,6 +95,11 @@
@CalendarStart.AddDays(i).ToString("ddd").Substring(0,1)
} + @for (int i=0; i
+ } + @foreach (var Date in ShowingDates) {