How to show popup when I click inside edit + allow selecting month (remove day select)

Hi there,

I'm new to your WPF controls, so these might be easy questions.

First one:
I'm trying to show the popup (with calendar) as soon as the user clicks in the input (now I must click on the calendar icon to show the popup).
How can I change that?

Second question:
How can I use DateTimeEdit to allow selecting months?
Right now the popup that is shown displays month view (you can select a specific day of the month), but when you click on month name you go to year view (that allows selecting month). I'd like to remove the day picker and allow only selecting the year and month.

Is this possible?

Best regards,
Tomasz

8 Replies 1 reply marked as answer

SN Sudharsan Narayanan Syncfusion Team January 25, 2021 07:03 PM UTC

Hi Tomasz Jagusz,
 
  
Thanks for contacting Syncfusion Support,

 
we are analyzed your queries of "How to show popup when I click inside edit + allow selecting month (remove day select)" and details are

Query one 
Currently, we are analyzing your requirement of “Show Popup in a click”. We will validate and update you the details on or before January 27, 2021. 
Query two 
We have analyzed your query “displays month view". We suggest you to use Property Pattern as “YearMonth” and We have prepared a simple sample for displays month view.  Please have the sample from the below link.

Sample Link:
https://www.syncfusion.com/downloads/support/directtrac/general/ze/MonthView-225981943.zip 
 
 
 Please check with above sample and let us know if you need any further assistance.
  
Regards, 
Sudharsan N 



TJ Tomasz Jagusz January 25, 2021 09:48 PM UTC

Hi Sudharsan,

thank you for the quick reply.

The second part works as expected. Is there a way to set the "Today" button label? When in month view (DisableDateSelection = true) I'd like to display "Current month" instead of "Today". This is just a small visual thing but would be nice to change.

Best regards,
Tomasz


BR Bharathi Rajakantham Syncfusion Team January 27, 2021 01:47 PM UTC

Hi Tomasz 

Thanks for your patience, 

Query 1: How to show popup when I click inside DateTimeEdit 

We have checked the reported query and logged a feature request on this. The patch for this fix will be included in our upcoming volume release. We will intimate you once it gets published. We will provide you the feedback link shortly. 

Query 2: Display current month instead of today 
 
We have checked the reported query and you can achieve your requirement using Localization Support. Please check the documentation link for your reference. 


Please let us know if you need any further assistance on this. We will be glad to assist you. 

Regards, 
Bharathi R 



TJ Tomasz Jagusz January 27, 2021 01:58 PM UTC

Hi Bharathi,

thank you for the update.

Ad1 - thank you for creating the feature request

Ad2 - I'm aware of the localization resources, but I need to use multiple DateTimeEdits in my app. If I change localization from "Today" to "Current month", then this will affect all the components.
Ideally, I'd like to be able to specify "Current month" as a label for a specific DateTimeEdit. If that is not possible please create a  feature request for that (if possible)

Best regards,
Tomasz


BR Bharathi Rajakantham Syncfusion Team January 28, 2021 04:48 PM UTC

Hi Tomasz, 
 
Thanks for your patience, 
 
Query 1: How to show popup when I click inside DateTimeEdit . 
 
You can track the status of the feedback using the following feedback link, 
 
 
Query 2: Display current month instead of today  
 
We have logged a feature request where we can set the visibility of the Today Button when switching to other views in DateTimeEdit control and the patch for the fix will be included in our Vol1 2021 release which is estimated to be available on March end. You can track the status of the feature using the following feedback Link. 
 
 
We appreciate your patience until then, 
 
Regards, 
Bharathi R 



BR Bharathi Rajakantham Syncfusion Team March 31, 2021 07:06 PM UTC

Hi Tomasz, 
 
Thanks for your Patience. 
 
We are facing some complexities in implementing the reported feature ”show popup when I click inside DateTimeEdit control” from our end. It will be included in our upcoming Volume 2 release. Expected to be available at end of June. We will intimate you once it gets released. We appreciate your patience until then. 
 
Regards, 
Bharathi R 



TJ Tomasz Jagusz June 16, 2021 07:08 AM UTC

Hi Bharathi,

any updates on this?
Will vol 2 be released at the end of June? Will that feature (show a popup when I click inside DateTimeEdit control) be included in that release?

Best regards,
Tomasz


BR Bharathi Rajakantham Syncfusion Team June 17, 2021 10:40 AM UTC

Hi Tomasz, 
 
Thanks for your patience. 
 
We have property to open and close the calendar popup of DateTimeEdit. Prepared sample to achieve your requirement, In this sample, when the datetime is clicked, Popup has been opened through IsDropDownOpen. Please check the sample and video for the same. 
 
Code Snippet: 
 
       private void dateTimeEdit_PreviewMouseUp(object sender, MouseButtonEventArgs e) 
        { 
            if (dateTimeEdit != null && dateTimeEdit.IsFocused && !dateTimeEdit.CanEdit) 
            { 
                dateTimeEdit.IsDropDownOpen = true; 
            } 
        } 
 
        private void Window_MouseDown(object sender, MouseButtonEventArgs e) 
        { 
            if (dateTimeEdit.IsDropDownOpen) 
            {  
                dateTimeEdit.IsDropDownOpen = false; 
            } 
        } 
 
 
Output: 
 
 
Please try the above solution and let us know if you need any further assistance on this. We will be glad to assist you. 
 
Regards, 
Bharathi R 
 


Marked as answer
Loader.
Up arrow icon