Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6868353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:25:26+00:00 2026-05-27T03:25:26+00:00

I am using JQuery-Mobile datebox , and I want to set date input data-options

  • 0

I am using JQuery-Mobile datebox , and I want to set date input data-options using JQuery

edit:

my question is : how to set date input data-options using jquery ?

input code :

            <input 
                name="mydate" 
                id="mydate" 
                type="date"
                pickPageTheme="a"
                data-role="datebox"
                data-options='{"mode": "calbox" }' />
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:25:27+00:00Added an answer on May 27, 2026 at 3:25 am

    The datebox plugin internally relies on data() to parse the data-options attribute, so you can use its setter form instead of creating an explicit attribute:

    $("#mydate").data("options", {
        mode: "calbox",
        highDates: ["2011-11-02", "2011-11-03"],
        highDatesAlt: ["2011-11-09", "2011-11-10"],
        pickPageOAHighButtonTheme: "b"
    });
    

    Do not forget to refresh the widget afterwards if it’s already been created:

    $("#mydate").datebox("refresh");
    

    EDIT: Unfortunately, the code above won’t work if the datebox widget was automatically created by the mobile framework on page load (since the data-options attribute is only parsed once). To work around that problem, you can use the options method:

    $("#jqmdb").datebox("option", {
        mode: "calbox",
        highDatesAlt: ["2011-11-09", "2011-11-10"],
        highDates: ["2011-11-02", "2011-11-03"],
        pickPageOAHighButtonTheme: "b"
    });
    

    In that case, however, you have to specify highDatesAlt before highDates, or the former will be ignored.

    I updated your fiddle here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using jquery mobile link and i'm setting it like below: <a data-theme=a data-iconpos=notext
I am using jquery Mobile 1.0. I have this html code. <label for=slider class=ui-hidden-accessible>
I am using jquery mobile and phonegap. Here is my json result set getting
I am using Jquery mobile, and I have these two select lists, I want
I am using JQuery Mobile Datebox as I am having the following problem. I
I am new to jquery mobile.I am displaying button using <input type=button id=result value=
I'm using JQuery-Mobile. On specific child page loads, I want to perform one JavaScript
I'm using jquery-mobile with Ruby On Rails. I want to create a button link
I am using jQuery Mobile for the first time. I have the following code:
I am using jquery mobile... I have a button (data-role=button) which calls a javascript

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.