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 do I change the label color for a TimePicker inside a SfDataForm?

I cannot seem to set the TextColor for the automatically rendered TimePicker inside a SfDataForm:

[DataType(DataType.DateTime)]
[Display(Name = "Start Date")]
public DateTime StartDate { get; set; }

[DataType(DataType.Time)]
[Display(Name = "Start Time")]
public DateTime StartTime { get; set; }

[DataType(DataType.DateTime)]
[Display(Name = "End Date")]
public DateTime? EndDate { get; set; }

[DataType(DataType.Time)]
[Display(Name = "End Time")]
public DateTime? EndTime { get; set; }


public class DataFormLayoutManagerExt : DataFormLayoutManager
{
      public DataFormLayoutManagerExt(SfDataForm dataForm) : base(dataForm)
      {

      }

      protected override void OnEditorCreated(DataFormItem dataFormItem, View editor)
      {
          if (editor is TimePicker)
              (editor as TimePicker).TextColor = Color.Blue;              

          editor.BackgroundColor = Color.Yellow;
      }
}


dataForm.LayoutManager = new DataFormLayoutManagerExt(dataForm);


Setting the TextColor still doesn't change the text color to blue. Any ideas why?

3 Replies

SP Subburaj Pandian Veluchamy Syncfusion Team April 23, 2019 10:51 AM UTC

Hi Karl, 
  
Thank you for contacting Syncfusion support. 
  
We have already found and fixed the mentioned issue “The text color for time editor doesn’t updated in DataForm” and the issue fix will be included in our upcoming 2019 Volume 1 Service Pack 1 release which is expected to be available by mid of May 2019. We appreciate your patience until then.  
 
Please let us know if you want the fix earlier, where we can include this fix in our upcoming Weekly NuGet release (April 23, 2019). 
 
Regards,
Subburaj Pandian V  



KA Karl April 23, 2019 10:56 AM UTC

Please do include it! It's preventing me from releasing an upcoming feature.

Highly appreciate it!


SP Subburaj Pandian Veluchamy Syncfusion Team April 23, 2019 11:46 AM UTC

Hi Karl, 
  
Thank you for the update. 
  
We will include this issue fix in our upcoming weekly NuGet update which is expected to be available by next week April 30, 2019. We appreciate your patience until then. 

Note: In our previous update, we wrongly mentioned as April 23, 2019 (today) instead of April 30, 2019. 
 
Regards,
Subburaj Pandian V  


Loader.
Live Chat Icon For mobile
Up arrow icon