We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to add a floating label to the EjsDatePicker?


2 Replies

YW Ying Wu December 23, 2019 02:43 PM UTC

I figured it out :-)

I add the FloatLabelType attribute to EjsDatePicker:
<EjsDatePicker TValue="DateTime?" @bind-Value="@CorpInfo.YearEnd" Placeholder="Year End" FloatLabelType="@FloatLabelType.Always" />

The FloatLabelType has to be Always, otherwise the label will not stay floating when the field out of focus.


SP Sureshkumar P Syncfusion Team December 24, 2019 11:34 AM UTC

Hi Ying, 
Greetings from Syncfusion support. 
We have validated your requirement with shared code. We would like to say that in our floatLabelType as Always showcased placeholder as placed above of the component.  
Kindly refer the screen shot for floatLabelType as always  
Please refer the floatlabelType property value and behavior  
Property value  
The placeholder text should not be float ever. 
The placeholder text floats above the component always. 
The placeholder text floats above the component while focusing or enter a value in Textbox. 
We have created a sample based on your requirement. please find the sample here: https://www.syncfusion.com/downloads/support/forum/150164/ze/FloatLabelTyle1516790322  
If we are misunderstood your requirement. please reproduce your issue in our attached sample and share the sample with replication procedure that will help us to provide exact solution at earliest. 
Sureshkumar P 

Live Chat Icon For mobile
Up arrow icon