I am trying to add a date picker to my site that has been "bootstraped". I am not using the DoJo picker or the native picker because of aesthetics. Here are the components that I am currently using:
http://bootstrap4xpages.openntf.org/ => installed and working perfectly
bootstrap date picker: http://eternicode.github.io/bootstrap-datepicker/?markup=input&format=dd.mm.yyyy&weekStart=&startDate=&endDate=&startView=0&minViewMode=0&todayBtn=false&language=en&orientation=auto&multidate=&multidateSeparator=&keyboardNavigation=on&forceParse=on#sandbox => This was installed by coping the .js and .css files into the database.
I have read through (and understood I think) Marky's blog entry: http://xomino.com/2012/01/26/using-jquery-selectors-in-xpages/
My problem is that no matter what I do I cannot get jQuery to add the .datepicker element to my field. I have tried both Marky's function, using a class name as the selector and just entering it directly. Does anybody have an idea what I am doing wrong?
Thank you in advance Ursus
PS: I would like to add that this is the first time I am using jQuery and bootstrap so be easy on me :o)
Here is the code:
=================== xPage =================
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex" xmlns:xc="http://www.ibm.com/xsp/custom">
<xp:this.resources>
<xp:script src="/bootstrap-datepicker.js" clientSide="true"></xp:script>
<xp:styleSheet href="/datepicker3.css"></xp:styleSheet>
<xp:script src="/jsTestBootstrap.js" clientSide="true"></xp:script>
</xp:this.resources>
<xp:panel
style="margin-left:10.0px;margin-right:10.0px;margin-top:10.0px;margin-bottom:10.0px">
<xp:div>
<div class="row">
<div class="col-xs-12">
<xp:label value="Select a date" id="label1" for="inputText1"></xp:label>
<xp:inputText id="inputText1" styleClass="jqDateField">
</xp:inputText>
</div>
</div>
</xp:div>
</xp:panel>
</xp:view>
===================== and here my clientSide code to select the field ==============
$("#view\\:_id1\\:inputText1").datepicker({
format: "dd.mm.yyyy"
});
====================== end =========================================================