Help write a demo of SfTimepicker, not very useful.
Requirements:
Like TimePicker in Metro.Controls, there is a picture of a clock with a textbox for hours and minutes, but this control can't change the background color that pops up, so Sycfusion is selected. But I'm not going to use only, I'm going to use only the simplest properties. But I ran into some problems. When writing the style, I had to click OK and Canle to select the time into the text box, and then I couldn't get a picture of the time. When rewriting the style, the DataTemplate background cannot be transparent. I want to be able to display the selected time directly into the TextBox like TimePocker in Metro.Controls.
Hi Vincent,
Thank you for reaching out with your queries regarding the SfTimePicker functionality.
Query 1: Clicking OK or Cancel to update the selected time in the TextBox
We recommend using the SetValueOnLostFocus property of the SfTimePicker. This will update the selected time in the TextBox without requiring you to click OK or Cancel buttons.
Query 2: Unable to get a picture of the selected time
To display the selected time directly in your custom clock control, we suggest binding the Value property of the SfTimePicker to the clock control. This will ensure synchronization between the time picker and your clock visualization.
Query 3: Background of the DataTemplate cannot be transparent
Based on the screenshots you provided, we’re unclear on the exact UI you are envisioning. Could you please provide more details or additional screenshots of the desired UI? With this information, we can customize the SfTimePicker style to meet your requirements.
Regards,
Sekar Sivalingam
Hi:
Thank you for reply.I think my problem is not clearly described.Ihave used DateTimepicker to write my own
Hi Vincent,
Thank you for your response. We would like to clarify your requirement further.
Could you confirm if you are using a WinForms or WPF application for DateTimePicker?
In addition, to better understand the problem and offer an accurate solution, could you share a sample project that replicates the issue?
This will assist us in analyzing your implementation and recommending the best possible solution.
We look forward to your response.
Regards,
Sekar Sivalingam
Hi Sekar Sivalingam:
I'm using WPF, I'm not using SfTimePiccker anymore, I'm rewriting DateTimeEdit myself. I mainly want Syncfusion's time controls or date events to be able to rewrite various styles I want through styles. It shows that now most of these controls only support theme modification, thank you for your support. In the future, I hope you can make the controls very flexible and the documentation more detailed.
Hi Vincent,
We have validated your query and implemented the requested functionality. We have used the DateTimeChanged event so that every time the selected time changes, it automatically appears in the DateTimeEdit box.
Please find the attached sample for your reference.
If we misunderstood the requirement, please provide an update on the requirement. It will help us prompt the solution earlier.
Regards,
Nithi Sneha S
Attachment: DateTimeEdit_738a35ee.zip
- 5 Replies
- 3 Participants
-
VI Vincent
- Jan 17, 2025 03:10 PM UTC
- Feb 5, 2025 01:17 PM UTC