SfDatePicker - Label not visible

I am new to syncfusion! Learning the steps of Blazor and Syncfusion!

Reaching out to the comunity here, to see if someone is having the same problem or is it just me!

So on this form all inputs have a nice label except dateinput, I am guessing because it's filled onload with some crazy date! Any workarounds? Even if I go to the model and put a DateTime.Now, since is filled on load the label does not show as well.



Syncfusion version: 18.4.0.35.

Regards!
A

3 Replies 1 reply marked as answer

VS Vignesh Srinivasan Syncfusion Team January 21, 2021 10:07 AM UTC

Hi Amaro, 
 
We can able to set the label to the DatePicker component by using the property FloatLabelType. Please find the code below. 
 
Code snippet: 
 
<div class="container"> 
    <label>Float label type as Always</label> 
    <SfDatePicker TValue="DateTime?" Placeholder="Select a date" FloatLabelType="Syncfusion.Blazor.Inputs.FloatLabelType.Always"></SfDatePicker> 
</div> 
 
<div class="container"> 
    <label>Float label type as Auto</label> 
    <SfDatePicker TValue="DateTime?" Placeholder="Select a date" FloatLabelType="Syncfusion.Blazor.Inputs.FloatLabelType.Auto"></SfDatePicker> 
</div> 
 
<div class="container"> 
    <label>Float label type as Never</label> 
    <SfDatePicker TValue="DateTime?" Placeholder="Select a date" FloatLabelType="Syncfusion.Blazor.Inputs.FloatLabelType.Never"></SfDatePicker> 
</div> 
 
Screenshot: 
 
 
 
 
Kindly check with the above sample. Please let us know if you need any further assistance. 
 
Regards, 
 
Vignesh Srinivasan. 


Marked as answer

UN Unknown Syncfusion Team January 21, 2021 11:09 AM UTC

Thank you! I was missing the place holder!


VS Vignesh Srinivasan Syncfusion Team January 22, 2021 05:27 AM UTC

Hi Amaro, 
 
You are welcome. 
We are glad to know that the provided solutions worked for you. Please contact us if you require any further assistance. 
 
Regards, 
 
Vignesh Srinivasan 


Loader.
Up arrow icon