End time Value Not Updating when Start time or Duration change in Appointment? - dynamics-crm-2013

I am creating new appointment and select start time and end time and when i change duration of appointment end time not updating according to duration value.
NOTE : Appointment form works fine.
and in Information form the value in Start Time and End Time also doesn't auto populate as in
Appointment form.

Related

Count down clock - getting the difference between two times

stuck on a simple one.
I have an project that will count down to a start time, the start time is generated from a datetime picker,("HH:mm"), when a button is clicked the time .now is subtracted and the timespan is passed to a timer for the countdown.
a rough outline of the code is
Aa4 is the output from the DateTime picker
Dim Span3
Dim TimetoStart as date
TimetoStart = TimeOfDay.Date 'get current time
Span3=StartTime.Subtract(Aa4) 'Subtract current time from output from datetime picker
LaBel4.text=span3 'Output to label (will be timer later for count down)
Error generated is system.invalidcastexception 'conversion from type timespan to type string is not valid.
As I said at the start it will be easy, I am not seeing it and its doing my head in, cheers all Daz

not able to capture telerik vuejs daterangepicker change event

I'm confused on how to capture the daterange event properly. The goal is to fire another event when the date range is changed (start and end dates are selected). But during debugging, it seems like the daterangepricker change event is fired when the start OR the end date is changed....it's hard to captured the "complete" change event because the change event is triggered when one of the dates is changed...so the state of the date range isn't isolated atomically (after start and end date are selected).
Observe the console.log output in the stackblitz during a date range change, it should be clearly depicted.
The expected behavior of the daterangepicker is that the change event wouldn't fired until the "range" event is completed - the start and end dates are selected.
To reproduce...select 20116-01-01 and try to forward through the dates to 2016-12-31....you can't (I mean you can but the start date is lost), when you start cycling through the months it resets the dates so they end up being "null".
The stackblitz (awesome by the way) is here: https://stackblitz.com/edit/js-mrcw3c
Thanks!

Pass query arguments to report

I have a report in MS Access that takes information from a query.
In the query there is time selection so that it displays information between a time interval set by the user.
The criteria I used to create this is:
Between [Enter start date:] And [Enter end date:]
I want the start date and end date to be displayed in my report as soon as the user inputs it.
I tried creating 2 text boxes and using the same code but what I end up with is the same input box twice when in reality I just want the input to be done only once.
Can anyone help me?
On your form, create two unbound textboxes:Name the first textbox StartDate and the second textbox EndDate.
Set the Format property for both textboxes to General Date to ensure that the user may only enter datetime data and is presented with a date picker.
In the selection criteria for your query, replace the following:
[Enter start date:] with Forms![Your Form Name]![StartDate]
[Enter end date:] with Forms![Your Form Name]![EndDate]
Change Your Form Name to the name of your form.
If you wish to also display the entered dates on your report, create one or two textboxes on the report whose Control Source is set to:
=Forms![Your Form Name]![StartDate]
Similarly for the End Date.

Eonsdan-datetimepicker How to set default date in Input when opens first time

im setting default date in Eonasdan-Bootstrap datetimepicker like this
$('#frmDate').data("DateTimePicker").defaultDate(moment().subtract(14, "days").calendar());
I know useCurrent will not fire. but I want to fire it so that when I open calendar first time it should intialized input with default date

VB time input, a better way to do it?

Working on a handy program for my boss at work as a summer project in between semesters both to make life easier for her, and to practice and improve my skills. Intent is to allow her to quickly and easily calculate the hours and minutes the person worked. The form itself has a series of text boxes for the Clock in and Clock out time for each day that week. Currently it attempts to convert the txtbox text into a Date variable, then .Subtract()'s the start from the end and stores it in a rolling total variable which is displayed at the bottom of the form. I can't help but think there is a better way of going about doing this, and I'm absolutely certain that having the below block of code 21 times (7 days, 3 shifts) is inefficient.
Dim StartTime As Date
Dim EndTime As Date
Dim Worked As System.TimeSpan
Dim WorkedTotal As System.TimeSpan
If chkFirst.Checked = True Then
StartTime = CDate(txtMonStart.Text)
EndTime = CDate(txtMonEnd.Text)
EndTime = EndTime.AddHours(12)
Worked = EndTime.Subtract(StartTime)
lblMonWork.Text = Worked.ToString()
WorkedTotal += Worked
Currently it works, mostly. The user has to enter the ":" in the time input, and if the total exceeds 24 hours, it displays a day column (40 hour 12 min work week displays as 1.16:12). I'd like to eliminate both of these unplanned features and allow for my input validation to take place when the focus changes to another box. A changing bgcolor would indicate an invalid input.
Any bright ideas?
Instead of using TextBox for the time input, use DateTimePicker, just change the Format property to Time.
Handle the Validating event of the DateTimePicker and if it's invalid just set e.Cancel = False, that way they can't save changes unless it's valid. Or if you want them to be able to leave the DateTimePicker and just change the colour, just handle the ValueChanged event instead.
Regarding your code sample, I haven't really looked at the logic of it, but instead of having the same code 21 times, just move the code into a separate function and then call that function with the start and end times as parameters and it can return the workedtime as it's return value.
I'm not sure what your UI looks like but if you're repeating the start time and end time input control multiple times as well it might be worth looking at creating your own usercontrol that can contain one each of the start and end time controls, and then you could have the validation be inside that user control so you don't have to have lots of event handlers etc.