Q:

How to get total timing of event time in minutes.

i am using a material design datepicker. 
how to get timeing of event.
this is link of demo event
Bootstrap-Material-datepicker1. 

A:

I think you have used last example of Bootstrap-Material-datepicker plugin where two datetime events start date and end date have been selected and now you want to find out difference of these two datetime events in minutes means (total time of event) , you can use javascript/jquery to calculate total time of events as follows:
After selecting start date (suppose 19/03/2018 20:30) and end date from (suppose 19/03/2018 22:40) Bootstrap-Material-datepicker, you can find total time as follows:
date1 = '19/03/2018 20:30';         // date selected by bootstrap material datepicker
date2 = '19/03/2018 22:40';

date1Arr = date1.split('/');        // Here, date is converted to array so that we can change format of date time which is accetable by Javascript
date1YearAndtime = date1Arr[2].split(" ");
newdate1 = date1YearAndtime[0]+"/"+date1Arr[1]+"/"+date1Arr[0]+" "+date1YearAndtime[1];                 // Combine array values to make it date format yyyy/mm/dd hour:minutes

date2Arr = date2.split('/');
date2YearAndtime = date2Arr[2].split(" ");
newdate2 = date2YearAndtime[0]+"/"+date2Arr[1]+"/"+date2Arr[0]+" "+date2YearAndtime[1];

var diff = Math.abs(new Date(newdate1) - new Date(newdate2));  // it finds difference between two dates in milliseconds

var minutes = Math.floor((diff/1000)/60);        // Here, milliseconds is converted to seconds when divided by 1000 and then converted to minutes when divided by 60
alert(minutes);

If you have any question, you can ask.

