1

I try to use Bootsfaces´ DateTimePicker but the popup for choosing the date and time is not working. I am using maven where i added the dependencie

<dependency>
    <groupId>net.bootsfaces</groupId>
    <artifactId>bootsfaces</artifactId>
    <version>0.9.1</version>
    <scope>compile</scope>
</dependency>

I am also using the namespaces

<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://xmlns.jcp.org/jsf/html"
  xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
  xmlns:p="http://primefaces.org/ui"
  xmlns:f="http://xmlns.jcp.org/jsf/core"
  xmlns:c="http://java.sun.com/jsp/jstl/core"
  xmlns:b="http://bootsfaces.net/ui">

This is the place where i want to use the DateTimePicker

<div class="row">
    <b:dateTimePicker mode="inline"/>
</div>

I´d appreciate it if anyone could help me with this.

EDIT: Screenshot of the result (mode='inline' deleted)

The problem is that the button on the right side which should open the popup is not clickable. Also by focusing the input field no popup is shown.

NotMyFaultSir
  • 173
  • 11
  • Did you try removing the mode attribute? Default is popup and not inline. – Zhedar Sep 22 '16 at 11:23
  • yes but it doesn´t work either. using the mode i tried to check if just the popup is shown in a wrong way – NotMyFaultSir Sep 24 '16 at 10:21
  • What do you mean by 'in a wrong way'? Are you using a custom theme? Can you provide a screenshot of your result? – Zhedar Sep 24 '16 at 12:13
  • With in the worng way i mean something like out of the screen range (it happened before so that is something i usually check). The result without "mode='inline'" you can see above. – NotMyFaultSir Sep 25 '16 at 15:02

1 Answers1

1

For some reason, bootsfaces doesnt add 'moment.min.js' and 'bootstrap-datetimepicker.min.js' as javascript resources...

Adding the following code in xhtml page solves the problem:

<h:outputScript name="js/moment.min.js" /> 

<h:outputScript name="js/bootstrap-datetimepicker.min.js" />

You can download these files here: Moment

https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js

Datetimepicker

https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/js/bootstrap-datetimepicker.min.js

vmvini
  • 62
  • 6