Copied to clipboard

Flag this post as spam?

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


  • Kaj 41 posts 73 karma points
    Oct 17, 2010 @ 17:26
    Kaj
    0

    Doc2form-datepicker?

    I got everything to work fine in doc2form, but the picker in datepicker on form donĀ“t show up? Just a label?!

    Anyone??

  • Kaj 41 posts 73 karma points
    Oct 17, 2010 @ 18:49
    Kaj
    0

    Maybe I should say that I use Umbraco 4.5.2

    Plz anyone, I really need it for a customer

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Oct 17, 2010 @ 20:03
    Dirk De Grave
    0

    All I can say is that the datepicker datatype has dramatically changed since the umbraco v4.5+ version, so not sure if it can be fixed easily. I'm pretty sure it'll be some kind of javascript issue/reference. Can you check with Firefox/Firebug to see whether there's js errors and what those errors are?

    Looking forward to your info.

    Cheers,

    /Dirk

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Oct 18, 2010 @ 12:13
    Ismail Mayat
    0

    kaj,

    I had similar issue with datepicker and using it with contour field. The way i got round this was to make the contour field a text field and using jquery ui datepicker http://jqueryui.com/demos/datepicker/ you could do something similar for doc2form?

    Regards

    Ismail

  • Kaj 41 posts 73 karma points
    Oct 18, 2010 @ 14:51
    Kaj
    0

    Wow Ismail! Pleece cant you explain how i do to get it like this? Pleece :-)

    Its beutiful! :D

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Oct 18, 2010 @ 16:23
    Ismail Mayat
    0

    lets say you have in your document type that is being used by doc2form field called date of birth with alias dateOfBirth then in doc2form generated html you will have something like 

    <li class="textbox required dateOfBirth_li"><label for="ctl00_ctl00_ctl00_ContentPlaceHolderDefault_TemplateContent_Doc2Form_9_dateOfBirth">Date of birth <span>*</span></label><br><input name="ctl00$ctl00$ctl00$ContentPlaceHolderDefault$TemplateContent$Doc2Form_9$firstName" type="text" id="ctl00_ctl00_ctl00_ContentPlaceHolderDefault_TemplateContent_Doc2Form_9_dateOfBirth" class="umbEditorTextField"></li>

    in your template you need

     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/base/jquery-ui.css" type="text/css" media="all" /> 
    <link rel="stylesheet" href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css" type="text/css" media="all" /> 
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js" type="text/javascript"></script> 
    <script type="text/javascript">
        $(document).ready(function(){
            $("li.dateOfBirth_li input").datepicker({ 
                dateFormat: "dd/mm/yy",
                buttonImageOnly: true,
                changeMonth: true,
                changeYear: true, 
                buttonText: "Choose",
                buttonImage: "/images/iconCalendar.gif"
            });
    
        });
    </script>

     

    that will target the textbox and make it a jquery ui datepicker. the button image i,e iconCalendar.gif you can download from jquery ui site or create your own.

    Regards

    Ismail

  • Kaj 41 posts 73 karma points
    Oct 19, 2010 @ 09:24
    Kaj
    0

    @Dirk I got 1 wrong:

    jQuery("#ContentPlaceHolderDefault_AmegaSupportDistribMasterContentPlaceHolder_Doc2Form_3_ctl08").umbDateTimePicker is not a function

     

    I hope this can help a bit :)
    @Ismail thankyou verry much, this was really helpful!
    Do you know if ther is any simular for timepicker?
    Is ther any licenslimits for JQuery-stuff?
    Best best regards,
    Kaj
  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Oct 19, 2010 @ 10:11
    Ismail Mayat
    0

    kaj,

    not sure if there is time picker although might be worth checking the jquery ui documentation for datepicker.  As far as i am aware there are no licensing issues again check the jquery ui site.

    Regards

    Ismail

  • Tommy Poulsen 514 posts 708 karma points
    Nov 22, 2010 @ 17:24
    Tommy Poulsen
    0

    Just had this issue myself and did a bit of investigation. It seems I got it working by directly referencing the jQuery.js/jQueryUI.js files from my template. Also note that the default behavior has changed - now you have to click the text field (using default behavior at least) to see the datepicker control.

    >Tommy

     

  • Tommy Poulsen 514 posts 708 karma points
    Nov 22, 2010 @ 20:26
    Tommy Poulsen
    1

    For the record, I got it working by adding this:

      <link rel="stylesheet" href="/umbraco_client/DateTimePicker/datetimepicker.css" type="text/css">   
      <script type="text/javascript" LANGUAGE="JavaScript" src="/umbraco_client/ui/jquery.js"></script>
      <script type="text/javascript" LANGUAGE="JavaScript" src="/umbraco_client/ui/jqueryui.js"></script>
      <script type="text/javascript" LANGUAGE="JavaScript" src="/umbraco_client/DateTimePicker/umbDateTimePicker.js"></script>

    >Tommy


  • sun 403 posts 395 karma points
    Nov 23, 2010 @ 02:23
    sun
    0

    Does Doc2Form support new schema in 4.5.2?

  • Tommy Poulsen 514 posts 708 karma points
    Nov 23, 2010 @ 08:58
    Tommy Poulsen
    0

    It seems to be working nicely with the new schema - the only issue I've experienced so far is the datepicker issue mentioned above,

  • roger malik 4 posts 24 karma points
    Jul 25, 2012 @ 13:51
    roger malik
    0

    I had this line in /umbraco/editContent.aspx

     <script type="text/javascript" src="../../scripts/jquery-1.7.1.min.js"></script>

     

    changing it to

     <!--script type="text/javascript" src="../../scripts/jquery-1.7.1.min.js"></script-->

    did the trick.

     

  • Connie DeCinko 931 posts 1160 karma points
    Sep 27, 2012 @ 17:23
    Connie DeCinko
    0

    I was able to get the datepicker to show up, but the timepicker portion is missing.  How can I get that to work?

     

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Sep 28, 2012 @ 10:48
    Ismail Mayat
    0

    Looks like you cannot have time as well so take a look at http://stackoverflow.com/questions/1028409/jquery-datepicker-and-timepicker-for-same-input-field-to-popup-one-after-another may need another jquery plugin??

  • Connie DeCinko 931 posts 1160 karma points
    Sep 28, 2012 @ 22:35
    Connie DeCinko
    0

    Turns out it was easy, just had to include the timepicker script file.  Odd, since I could swear I tried that the day before.  Anyhow, it works now.

     

  • Oscar Jurado 5 posts 25 karma points
    Nov 28, 2013 @ 20:44
Please Sign in or register to post replies

Write your reply to:

Draft