Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Louise Newton 4 posts 26 karma points
    Sep 06, 2013 @ 10:41
    Louise Newton
    2

    Found a way to render the datepicker!

    Umbraco version 6.1.4, I installed the two packages StandardWebsiteMVC_2.0.zip and Contour (still in trial version)

    MVC 4.5, Windows 8, IIS Express, running in localhost/dev

    This was the problem/issue, across both IE and Chrome browsers:-

    The datepicker would render when you previewed a form containing it, in the Contour section.  However, when you added a form which contained a datepicker, then viewed that content, the datepicker would not render.

    This issue is easily reproducable and has been noted by other umbraco users, as far as I can tell.

     

    What I did to solve it (which got the datepicker to render):-

    Compared view source for previewing the form in the Contour section, and view source for the content that renders the same form (via razor macro).  

    In the body of /umbraco/plugins/umbracoContour/previewFormDialogMvc.aspx, I found 4 links to various javascript files (lines 28-31), which appear below. I then copied and pasted these links, into /umbraco/plugins/umbracoContour/views/Form.cshtml, just after Html.EnableUnobtrusiveJavaScript(), prefixing each path with ~/umbraco/plugins/umbracocontour/

        <script type="text/javascript" src="scripts/jquery-1.5.1.min.js"></script>
        <script type="text/javascript" src="scripts/jquery-ui-1.8.11.min.js"></script>
        <script type="text/javascript" src="scripts/jquery.validate.min.js"></script>
        <script type="text/javascript" src="scripts/jquery.validate.unobtrusive.min.js"></script>

  • Comment author was deleted

    Sep 11, 2013 @ 15:57

    Yeah the datepicker that is used by the razor macro is the one from jquery ui so you need that in order to get it working :)

Please Sign in or register to post replies

Write your reply to:

Draft