smDateTimeRangePicker icon indicating copy to clipboard operation
smDateTimeRangePicker copied to clipboard

Time Picker Granularity

Open ddgrimmson418 opened this issue 8 years ago • 4 comments

Hi there, Its an awsm plug in that you have created however it lacks a functionality that might come in handy... as a developer I have seen a lot of date and time picker but one thing all of them lack is the resolution of the time is min by min which is not required and one should be able to customize the same... Any ways I am looking for a quick way to how to change the granularity so kindly help me in the same if you can.

ddgrimmson418 avatar Jan 07 '17 11:01 ddgrimmson418

when u say min time u want to add seconds to time picker?

mominsamir avatar Jan 07 '17 15:01 mominsamir

No.... what I mean is the granularity... I mean the time in the mins is displayed as 1,2,3,4,5.... 60 I want it in 5,10,15,20..... 60 ... I hope this clears

ddgrimmson418 avatar Jan 07 '17 15:01 ddgrimmson418

@ddgrimmson418 You can change the the last part of the for loop for the TimePickerCtrl.prototype.buildMinuteCells That's where it creates the minute cells so if you want every 5 minutes for example just change that line to for (var i = 0 ; i <= 59; i+=5) {

tcasey avatar Jan 09 '17 16:01 tcasey

@tcasey @mominsamir what trevor suggests basically means I will be changing the bower component code which is not a best practice in programming... can you please suggest a way it can be done without changing the bower component code

ddgrimmson418 avatar Feb 06 '17 10:02 ddgrimmson418