File tree Expand file tree Collapse file tree 3 files changed +21
-5
lines changed
CodeBeam.MudBlazor.Extensions.Docs/Pages/Components/DateWheelPicker/Examples
CodeBeam.MudBlazor.Extensions/Components/DateWheelPicker Expand file tree Collapse file tree 3 files changed +21
-5
lines changed Original file line number Diff line number Diff line change 33
44<MudGrid >
55 <MudItem xs =" 12" sm =" 8" >
6- <MudDateWheelPicker @bind-Value =" _date" DateView =" _dateView" Editable =" _editable" Label =" Date" Clearable
7- ShowToolbar =" _showToolbar" ShowHeader =" _showHeader" SubmitOnClose =" _submitOnClose" Variant =" Variant.Outlined" Color =" _color" ColorTime =" _colorTime"
8- DateFormat =" @_dateFormat" FixDay =" _fixDay" FixMonth =" _fixMonth" FixYear =" _fixYear" FixHour =" _fixHour" FixMinute =" _fixMinute" FixSecond =" _fixSecond" />
6+ <MudDateWheelPicker @bind-Value =" _date" DateView =" _dateView" Editable =" _editable" Label =" Date" Clearable InputAdornment =" @(_isAdornmentEnd ? Adornment.End : Adornment.Start)"
7+ ShowToolbar =" _showToolbar" ShowHeader =" _showHeader" SubmitOnClose =" _submitOnClose" Variant =" Variant.Outlined" Color =" _color" ColorTime =" _colorTime"
8+ DateFormat =" @_dateFormat" FixDay =" _fixDay" FixMonth =" _fixMonth" FixYear =" _fixYear" FixHour =" _fixHour" FixMinute =" _fixMinute" FixSecond =" _fixSecond"
9+ TransformOrigin =" Origin.TopCenter" AnchorOrigin =" Origin.BottomCenter" />
910 </MudItem >
1011
1112 <MudItem xs =" 12" sm =" 4" >
2021 <MudSwitchM3 @bind-Value =" _showToolbar" Color =" Color.Secondary" Label =" Show Toolbar" />
2122 <MudSwitchM3 @bind-Value =" _showHeader" Color =" Color.Secondary" Label =" Show Header" />
2223 <MudSwitchM3 @bind-Value =" _submitOnClose" Color =" Color.Secondary" Label =" Submit On Close" />
24+ <MudSwitchM3 @bind-Value =" _isAdornmentEnd" Label =" Adornment End" Color =" Color.Secondary" />
2325 <MudSelect @bind-Value =" _color" Variant =" Variant.Outlined" Label =" Color" >
2426 @foreach ( Color item in Enum .GetValues <Color >())
2527 {
6264 bool _fixHour ;
6365 bool _fixMinute ;
6466 bool _fixSecond ;
67+ bool _isAdornmentEnd = true ;
6568}
Original file line number Diff line number Diff line change 1111 TextUpdateSuppression =" false"
1212 Value =" @(Text)" Underline =" @Underline"
1313 Disabled =" @Disabled" ReadOnly =" !Editable" Error =" @Error" ErrorId =" @ErrorId"
14- OnAdornmentClick =" HandleAdornmentClick" AdornmentIcon =" @_currentIcon " Adornment =" Adornment.End "
14+ OnAdornmentClick =" HandleAdornmentClick" AdornmentIcon =" @InputAdornmentIcon " Adornment =" @InputAdornment "
1515 AdornmentColor =" @AdornmentColor" IconSize =" @IconSize" OnBlur =" HandleOnBlur"
1616 Clearable =" @Clearable" OnClearButtonClick =" HandleClearButtonClick"
1717 @attributes =" UserAttributes" />
Original file line number Diff line number Diff line change @@ -235,7 +235,20 @@ protected override void OnInitialized()
235235 public int MaxHeight { get ; set ; } = 300 ;
236236
237237 internal bool _isOpen ;
238- internal string _currentIcon { get ; set ; } = Icons . Material . Filled . CalendarMonth ;
238+
239+ /// <summary>
240+ /// The icon displayed as adornment in input.
241+ /// </summary>
242+ [ Parameter ]
243+ [ Category ( CategoryTypes . FormComponent . ListAppearance ) ]
244+ public string ? InputAdornmentIcon { get ; set ; } = Icons . Material . Filled . CalendarMonth ;
245+
246+ /// <summary>
247+ /// The adornment position in input.
248+ /// </summary>
249+ [ Parameter ]
250+ [ Category ( CategoryTypes . FormComponent . ListAppearance ) ]
251+ public Adornment InputAdornment { get ; set ; } = Adornment . End ;
239252
240253 /// <summary>
241254 /// Sets the anchor origin point for the popover.
You can’t perform that action at this time.
0 commit comments