In this video tutorial, I demo how to include a bootstrap date-picker into an XPages application that’s using the Twitter Bootstrap framework.
Below is the URL to access the online date-picker sandbox dashboard, which is a great service to assist setting up your date-picker control:
Datepicker for Bootstrap Sandbox
The following is the code to create the Bootstrap Resources custom control (ccBootstrapResources), which will reference the necessary Twitter Bootstrap and jQuery files via CDN services:
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"> <xp:this.resources> <xp:script src="https://code.jquery.com/jquery-1.11.3.min.js" clientSide="true"> </xp:script> <xp:script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" clientSide="true"> </xp:script> <xp:styleSheet href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> </xp:styleSheet> </xp:this.resources> </xp:view> |
The following is the code to create the Datepicker Resources custom control (ccDatePickerResources), which will reference the necessary Bootstrap Datepicker files that need to be added to the XPages design in the Web Content folder:
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"> <xp:this.resources> <xp:script src="bootstrap-datepicker/js/bootstrap-datepicker.min.js" clientSide="true"> </xp:script> <xp:styleSheet href="bootstrap-datepicker/css/bootstrap-datepicker3.min.css"> </xp:styleSheet> </xp:this.resources> </xp:view> |
A special thanks to Mr David Leedy for presenting my video tutorial on NotesIn9.
NOTE: Apologies everyone for not embedding the video tutorial in this blog post. We are having some technical difficulties.
Click here to watch the video tutorial
Enjoy JohnThe post Video Tutorial: Bootstrap Datepicker in XPages – Part 1 appeared first on Johnno's Workbench.