@namespace Connected.Components
@inherits DatePickerBase

@Render

@code{

    protected override RenderFragment InputContent=> 
        @<InputControl Label="@Label" Variant="@Variant" HelperText="@HelperText" Error="@HasError" 
                          ErrorText="@ErrorText" Disabled="@Disabled" Margin="@Margin" Required="@Required"
                          @onclick="() => { if (!Editable) ToggleState(); }" ForId="@FieldId">
               <InputContent>
                   <RangeInput @ref="_rangeInput" @attributes="CustomAttributes" InputType="@InputType.Text" Class="@PickerInputClass" Variant="@Variant" ReadOnly="@(!Editable)"
                                   @bind-Value="@RangeText" Disabled="@Disabled" Adornment="@Adornment" AdornmentIcon="@AdornmentIcon" AdornmentColor="@AdornmentColor" IconSize="@IconSize" OnAdornmentClick="ToggleState"
                                   Required="@Required" RequiredError="@RequiredError" Error="@HasError" ErrorText="@ErrorText" Margin="@Margin" AdornmentAriaLabel="@AdornmentAriaLabel"/>
               </InputContent>
           </InputControl>;
    
}
