Preeti
Preeti

Reputation: 23

jqm datebox, mode timebox giving error 'There is no mode by that name loaded/mode not given'

I am using jqm datebox; the mode is timebox. I have added the required libraries but get the error:

There is no mode by that name loaded/mode not given.

It used to work with previous versions of jquery and jquery mobile, but doesn't work with the latest versions.

<input name="timeDateBox" type="date" data-role="datebox" data-options='{"mode": "timebox", "timeFormatOverride":12}' id="timeDateBox" />

Here is the code: http://jsfiddle.net/AbVqh/194/

Upvotes: 2

Views: 2722

Answers (1)

Gajotres
Gajotres

Reputation: 57309

Working example: http://jsfiddle.net/Gajotres/pFJ7Z/

You were initializing wrong databox js files.

There files don't exist:

<script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.calbox.min.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.datebox.min.js"></script>

Correct ones:

<script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.mode.calbox.min.js"></script>
<script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.mode.datebox.min.js"></script>

Upvotes: 3

Related Questions