+ Start a Discussion

Bootstrap on Visualforce

Can anyone recommend a Bootstrap based Datepicker which works with Visualforce ?

I have tried my hand at a few options but none of them seem to work properly!



well Bootsrap revolves around HTML5 this means you can use the HTML5 tags available @ Salesforce. Like the <apex:input type="Date"> or even inputField . Make sure you mark the doctype="html-5.0" for your page tag
Ankit GuptaAnkit Gupta

I have been using bootstrao 3.0 in my VF page and date picker .Below is the code :

<apex:inputText id="dop" style="width: 156px" value="{!ValidFromDate}" size="12" onfocus="DatePicker.pickDate(false, '{!$Component.dop}', false);"  /><apex:outputLink styleClass="dateFormat" value="javascript:DatePicker.insertDate('{!$Component.dop}', true);"></apex:outputLink></div>

Do remember to include jquery in your VF page.<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

Ankit Gupta