Multiple Time Pickers on a page

1 reply · opened Apr 4, 2019

PpixelsalsaApr 4, 2019

Hi - So I have a time picker working fine - the problem occurs when I have more than one as the others don't work.
JS is <script type="text/javascript">
$(function() {

			$('.datetimepicker').datetimepicker({
			showClose: true,
			sideBySide: true,
			format: 'h:mm A',
			disabledHours: [0,1,2,3,4,5,6,7,8,22,23],
			stepping:15     
			
	});

});

&lt;/script&gt;

Any quick thoughts on fixing this please?

SSemicolon WebSTAFFApr 6, 2019

Hello,

You will need to assign a Unique ID to the .datetimepicker Elements and then change the data-target Values accordingly. Consider using this Example:


	Date & Time Picker
	
		
			
			
				
			
		
	

	Date & Time Picker
	
		
			
			
				
			
		
	

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard