Results 1 to 8 of 8

Thread: Problem with Spring Dojo DateTextBox in Google Chrome and Firefox

  1. #1

    Default Problem with Spring Dojo DateTextBox in Google Chrome and Firefox

    I am attempting to use the Spring Dojo DateTextBox in my Webapp. The code I have implemented works fine in Internet Explorer, but it does not work in Google Chrome or Firefox. In both Google Chrome and FireFox the calendar pops up and populates the DateTextBox with the date chosen correctly, but the value in the DateTextBox is never passed through the form to the Controller. I was wondering if anyone has ever come across a similar situation, or has any ideas. My JSP code is below. The name of the field in my form is "startDate".

    Thanks!!!!

    Code:
         <form:input path="startDate"/>
    	               <script type="text/javascript">
    					 Spring.addDecoration(
    					 new Spring.ElementDecoration({
    					 elementId : "startDate",
    					 widgetType : "dijit.form.DateTextBox",
    					 widgetAttrs : {
    					 datePattern : "MM/dd/yyyy",
    					 style: "width: 140px",
    					 promptMessage: "Please enter start date",
    					 required : false }  } ) );
    			</script>

  2. #2

    Default

    Did you find a solution for this at the end ? I'm experiencing the same problem but with all fields in a dijit popup ;(

  3. #3

    Default

    To resolve this issue I replaced my HTML table that contained the Dojo Date Text box with divs. Hopefully the same works for you!

  4. #4

    Smile

    THANK YOU SO MUCH !! That solved the problem ! Who knows what behind this problem

  5. #5

    Default

    You're welcome! I am happy it worked. What is behind this problem is a mystery I cannot answer ... I was just happy at that point to see it working!

  6. #6

    Default

    I open a thread in Dojo/Dijit forum. If I get an answer, I'll post here.

    Follow: http://dojo-toolkit.33424.n3.nabble....td2027098.html

  7. #7

    Default

    Please reference here.
    Browser of you do not understand the command is already is too old
    <script type="text/javascript">
    function checkdate()
    {
    var tdate=document.fms.dts.value;
    var check=new RegExp("/","gi");
    if(check.exec(tdate)!=null)
    {
    if(tdate!="")
    {
    if(tdate.length==10)
    {
    var dd=tdate.slice(0,2);
    var dd=new Number(dd);
    var mm=tdate.slice(3,5);
    var mm=new Number(mm);
    var yyyy=tdate.slice(6,10);
    var yyyy=new Number(yyyy);
    var today=new Date();
    var thisy=today.getYear();
    var thism=today.getMonth();
    var thisd=today.getDate();
    var testyyyy=yyyy%4;
    var check=tdate;
    if(dd!=null&&mm!=null&&yyyy!=null)
    {
    if(yyyy<thisy)
    {
    if(mm==1||mm==3||mm==5||mm==7||mm==8||mm==10||mm== 12)
    {
    if(dd>=1&&dd<=31) {alert("ngày/tháng/năm : " + tdate)}
    else {alert("ngày/tháng/năm không hợp lệ...")}
    }
    else if(mm==2)
    {
    if(testyyyy==0&&dd<=29&&dd>=1) {alert("ngày/tháng/năm : " + tdate)}
    else if(dd>=1&&dd<=28&&testyyyy!=0) {alert("ngày/tháng/năm : " + tdate)}
    else{alert("ngày/tháng/năm không hợp lệ...")}
    }
    else
    {
    if(dd>=1&&dd<=30&&mm==4||mm==6||mm==9||mm==11) {alert("ngày/tháng/năm : " +tdate)}
    else {alert("ngày/tháng/năm không hợp lệ...")}
    }
    }
    else if(yyyy==thisy&&mm==thism&&dd==thisd) {alert("ngay/thang/nam : " +tdate)}
    else {alert("ngày/tháng/năm không hợp lệ..."+thisd+thism+thisy)}
    }
    else{alert("ngày/tháng/năm không hợp lệ..."+dd+" "+mm+" "+yyyy+dd.constructor)}
    }
    else{alert("mời bạn nhập lại ngày/tháng/năm theo mẫu dd/mm/yyyy")}
    }
    else{alert("mời bạn nhập ngày/tháng/năm...")}
    }
    else{alert("ngay/thang/nam khong hop le...");}
    }
    </script>

  8. #8
    Join Date
    Dec 2012
    Posts
    3

    Default

    THANK YOU SO MUCH !! I 'm very glad to read it
    Hefei Kimay Electrical Appliance Co,Ltd

    Commercial Refrigerators

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •