Reset datepicker view using dl-date-time-picker in angular 8 - angular8

I have a datetimepicker component in a bootstrap modal. I'm using Angular 8 and have used Dalelotts dl-date-time-picker component.
I need to reset the view of date picker whenever user closes the modal i.e. if user selects date but not time and closes the modal, when reopens the modal datetime picker should display from date selection view. But in my case it is showing from where I left off. I tried setting the startView of this datetimepicker component to 'day' on modal close button callback event but did not fix my problem. Any idea to fix this?
I am using something like:
<dl-date-time-picker [(startView)]="startView" [(ngModel)]="enteredDate (change)="dateSelected($event)" [selectFilter]="datePickerFilter"> </dl-date-time-picker>
This is my sample working example:
https://stackblitz.com/edit/dalelotts-angular-date-time-picker?file=src%2Fapp%2Fapp.component.html

You can create an event of type (Click) in the button "Ok" and trigger an method that restart the input to an specific date or set to a empty string

Related

v-calendar event for previous and next header button

Is there a way to get the event when clicking previous and next button using v-calendar datepicker?
References:
https://github.com/nathanreyes/v-calendar-docs/blob/master/api.md
https://vcalendar.netlify.app/
I would use the update:from-page event. The page parameter is passed that allows you to get meaningful data about what month was navigated to.
https://vcalendar.io/api/v2.0/calendar.html#update-from-page

How to refresh parent page after closing dialog box which is not a interactive report

I tried to refresh a region in parent page while closing modal box in apex but the parent page is not interactive report So dynamic action refresh is not working. what can be done in these situations?
i tried dynamic action with dialog closed option but its not working
no codes as its just action
I need to refresh the parent page even having new button as refresh.
try to run this javascript code after closing the dialog
apex.event.trigger( "#myRegionStaticID", "apexrefresh" );

VB.Net DateTimePicker how to stop navigation button from setting a default date

I have added a DateTimePicker to my windows forms vb app. Its sets the date when left or right navigation button is clicked. I want to the box to be populated only when an date is clicked. Currently when the navigation button is clicked a date gets set in the box.I looked around in stackoverflow and google but not finding a solution to this specific problem
Figured out the my mistake. I needed to handle the 'DateSelected' event and not the 'DateChanged' event. DateChanged events are getting fired as part for the month changes when clicked on the left/right navigator button and also when the year changes.

Why change event of an input does not fire with jQuery?

I use jQuery with asp.net.
I have an Input that its value will change after a process:
first a button is clicked and a popup dialog is opened and an item is selected, then popup is closed and the value of my input is changed.
i want to get the change event and do sth, but nothing happen.
Thanks for help
Are you looking for something like this?
http://jsfiddle.net/rsarika/b9NTS/1/
When the popup is opened I set the parameter in session and then when the main page is focused I checked if the session has value (with ajax) and then I got the change value!

OOB NewForm in Dialog loses focus after a few seconds

Working in SharePoint 2010, with SharePoint Designer 2010, I have a DispForm to which I've added a DVWP that displays a filtered view of another relative list. The DVWP has a 'New' link which opens the NewForm for that list in a modal dialog, using OpenPopUpPage (http://msdn.microsoft.com/en-us/library/ff410825.aspx).
After 5 - 12 seconds, the blinking cursor disappears from the first control and the focus switches to the 'Close' button. If the user was trying to type and happens to hit the Enter key when the focus switches to the 'Close' button, the background is no longer darkened and the 'Cancel' button no longer works. The form is still displayed on the screen, and the user can 'Save' but the modal never goes away until the page is refreshed.
If the user notices that the modal has lost focus and clicked back on the form, everything works as it should and all is well.
Observations:
When the control/modal loses focus, the 'Close' button does not trigger a 'focusin' event. But, $(document.activeElement).attr("value") displayed in the console shows that it's the active element.
Questions:
Why is the modal losing focus?
Does anyone have a Javascript/jQuery workaround to capture the event and set the focus back where it was?
Alternately, what if I lock the form and wait for this focus-change to complete, then unlock it and set the focus on the first field? Ideas?
You may be having a problem if the DispForm is also a dialog and you open the modal with your script. It sounds like you are getting a "layered" effect. My guess is that the script managing the dialog is interfering with the modal. Have you tried turning off the dialiogs for the list?
Just so I get some points on this site, the affliction was the asynchronous refresh of the first modal. It was taking the focus away from the layered modal.
Thanks JB for the answer!
I figured out the problem: the DVWP was using Auto-Refresh with the Async Update. This was running every 15 secs, taking the focus away from the modal, then not returning it to the last control.
So, we turned of the auto-refresh and used the callback from the modal close to trigger a click on the manual refresh button instead.