Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1240
  • Last Modified:

How Do You Add a Clickable Calendar Icon to the MVC Date Picker?

My MVC 4 Calendar Control will only display a textbox that will bring up a calendar when it is clicked.  I need to add a clickable calendar icon to the right of the textbox.

My icon does not show.

My Code:

@Html.TextBoxFor(model => model.DateOfBirth, new { id="date-of-birth", @class = "form-control datepicker", type="Text", placeholder = "Enter Date" })

$(document).ready(function () {
      $('.datepicker').datepicker({
            format: "mm/dd/yyyy",
            autoclose: true,
            showOn: "button",
            buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",
            duration:0
      });
});

Thanks,

Dan
0
danielolorenz
Asked:
danielolorenz
1 Solution
 
leakim971PluritechnicianCommented:
check the generated html as it shoudl work : http://jsfiddle.net/bbc22ft5/
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now