asp.net - Using Client-Side script to evaluate month difference using PeterBlum DifferenceValidator -


Problem:

I was using Peter Blum's Professional Verification Control () during my project And I have a verification that the customer should go back to the customer instead of going to the server, need to send the screen two dates (month / year) on the server, one for the beginning date and one for the expiration date. Dates are only using month / year only Peter's month text box (). Two dates should not be more than 3 months (Please note that I did not say the 90 days separately).

The end goal is:

The user comes to a screen to run a report. They are prompted for a start date (month / year) and an expiration date. These dates are sent to the server so that the reports for the items made within this date range can be prepared. Users can run this report for a period of 3 months only.

What have I done:

I started using Peter Validation and more package using the differential validator, in doing so, I determine the difference that I will have 90 days It was expected, but soon it felt that 7/2009 - 10/2009 is a 3 month difference (which is allowed), although it is a difference of 92 days (which is outside the validator range).

Question:

Is there any way that I can override the evaluation function in the client-side function so that I can compare the part of the month of that date What are you doing?

Thanks,

Scott Blue

Yes, there is a javascript example here:

  function validated category (condo) {var p = DES_GetById (cond.IDToEval). value; // Get the value of the control that you are evaluating if (p == undefined || p.length == 0) back 1; // Custom verification apply here // return valid if 1 return, or 0 if invalid}  

and you have to specify CustomEvalFunctionName = "ValidateDateRange" to work for it.

I believe customAval Function Night is supported in all Peter Blum validation controls.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -