DateTimeInput control

Nov 29, 2013 at 3:51 PM
Edited Nov 29, 2013 at 3:54 PM
I have been trying the given code example of two DateTimeInput controls to edit a Start and a Stop date with the DateRangeAttribute.
As soon as I add a DynamicMaximumDelay property to the Start DateRange attribuut I get the following javascript error during page load:
"Runtime-error JavaScript: Stop___Curr is not defined"
The following dynamic javascript code is highlighted:

$('#Start___Hidden').data('_ClientDynamicMax',
function()
{
var max=null;
var cmax=null;
if (Stop___Curr != null){ cmax = new Date(Stop___Curr.getTime()+0); if (max == null || cmax < max) max = cmax;}
return max;
});

My model is as follows:
 [DateRange(DynamicMaximum = "Stop",
             SMaximum = "Now+2y", SMinimum = "Now")]
        public DateTime Start { get; set; }

        [MileStone]
        public TimeSpan Delay { get; set; }

        [DateRange( SMaximum = "Now+2y", SMinimum = "Now")]
        public DateTime Stop { get; set; }
My Razor template is as follows:
 @{     var start = Html.DateTime("Start", Model.Start, dateInCalendar:true); 
            var stop = Html.DateTime("Stop", Model.Stop, dateInCalendar: true);      }
@start.DateCalendar(inLine:false) &nbsp;&nbsp;Starttime: @start.Time()  &nbsp;&nbsp;Stoptime: @stop.Time(dateHidden:true)
Now when I delete the DynamicMaximum = "Stop", property on the first DateRange all works fine but the two dates are not related to each other....

Does anyone have experience with this?
Coordinator
Nov 30, 2013 at 10:26 AM
Have you tried to remove dateInCalendar: true from the Stop date? It make no sense since then you write that the date part of stop must be hidden.Try this and let me know.
Nov 30, 2013 at 10:37 AM
Yes, I have tried all kinds of configurations for hours and hours. I started with the most simple configuration of two complete date + time displays. With and without jQuery calendar control etc. I always get the same error as soon as I add a DynamicMaximum on Start or a DynamicMinimum on Stop...

Regards,

Johan Stringer


2013/11/30 frankabbruzzese <[email removed]>

From: frankabbruzzese

Have you tried to remove dateInCalendar: true from the Stop date? It make no sense since then you write that the date part of stop must be hidden.Try this and let me know.

Read the full discussion online.

To add a post to this discussion, reply to this email ([email removed])

To start a new discussion for this project, email [email removed]

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Johan Stringer

Turbo FrontOffice

Tel: 06 -16809654
Mail: [email removed]
Coordinator
Nov 30, 2013 at 5:42 PM
I wiil prepare a test project to reproduce your error and I will let you know in a short time. May be it is due to some of the bugs we removed in the new release that will be published in a short time. If this is the case I will send you the new version.

Anyway are you using the 2.4 release of the toolkit?
Nov 30, 2013 at 6:26 PM
I don't have access to my project for the moment. Ik will check tomorrow which version I used.

Thanks for figuring this thing out. I appreciate your amazing product very much up till now...

Regards,

Johan Stringer


2013/11/30 frankabbruzzese <[email removed]>

From: frankabbruzzese

I wiil prepare a test project to reproduce your error and I will let you know in a short time. May be it is due to some of the bugs we removed in the new release that will be published in a short time. If this is the case I will send you the new version.

Anyway are you using the 2.4 release of the toolkit?

Read the full discussion online.

To add a post to this discussion, reply to this email ([email removed])

To start a new discussion for this project, email [email removed]

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Johan Stringer

Turbo FrontOffice

Tel: 06 -16809654
Mail: [email removed]
Coordinator
Dec 1, 2013 at 1:36 PM
Hi Johan,

the release you are using is not important. I figured out what the problem is. It is a bug we introduced in one of the last releases, and that was removed in the new upcoming 2.5 release.
The 2.5 release is alredy ready, but I don't know the exact date it will be officially published since it must be published the same day of the RTM of the Data Moving Plug-in.
Thus provide me your email address so I can send you the 2.5 bits. don't put your email here....just send me an email to: francesco##@##mvc-controls.com (with all # removed).