Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Date range edit on date field with text/calendar or text only
Last Post 09-20-2009 07:02 AM by David To. 11 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Mike EmryUser is Offline
going with the flow
going with the flow
Posts:44
Avatar

--
06-16-2009 02:33 PM

    I want to allow users to enter a date, either entering directly or using a calendar control.   I want to edit that the date is in the past.  I need to go back several years, so a date dropdown won't work.

    Any suggestions?

    Thanks,

    Mike

    CandaceUser is Offline
    river guide
    river guide
    Posts:2431
    Avatar

    --
    06-16-2009 02:44 PM

    Hi Mike,

    Dynamic Forms 3.0 has a new date field where you can set the starting and ending years.  Check out Demo 23 and hit 'Display Hidden Questions. The date field there has a start of -20 and an end of 5.  The starting years define how many years you want to go back from today and the ending years define the number of years going forward.  So in your case, you can set the starting year to -10 and the ending year to 0.

    Try it on our test site, www.betasprings.com (use host / dnnhost to log) and see it works for you.  Just add your own page under Dynamic Forms.  Thanks!

    Candace

    Mike EmryUser is Offline
    going with the flow
    going with the flow
    Posts:44
    Avatar

    --
    06-16-2009 02:53 PM

    What I'm looking for is to edit that it can't be after today's date.  The change sounds like I'm limited to dates only after this year.   Is there anything I can do for this kind of edit?

    Mike

    CandaceUser is Offline
    river guide
    river guide
    Posts:2431
    Avatar

    --
    06-17-2009 12:39 PM
    Hi Mike,

    This might be possible with SQL validation etc. I referred your question to David who is more skilled with this. Thanks!

    Candace
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    06-18-2009 07:43 AM
    HI Mike, under "Module Configuration" / "Validation Configuration", you have the option to use SQL validation. I suppose you can create an SQL query / procedure to check the datefield ($(datefield)) and see if it is greater than getdate() and return isValid = false. -- David
    jeropsUser is Offline
    river guide
    river guide
    Posts:99
    Avatar

    --
    09-11-2009 08:38 AM

    Hi,

    I'm kinda of working on the same thing...Except I want a question to be visible if it's not passed a  certain date.  So, if I created a hidden field with a default value of today's date with SQL Validation like:

    datefield($(datefield)) <= '03/15/2010' AS IsValid

    Then I have a question event check the above field, if it returned true then I would have it display another question.

    Is this the right way to do it and is the syntax above correct for the SQL Validation?

    Thanks in advance for your help.

    Jerry

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    09-11-2009 09:44 AM
    You don't need to do SQL validation. You can use this SQL default for setting default value of your hidden field.

    select case
    when datediff(day,getdate(),'3/15/2010') >= 0 then 'Positive'
    else 'Negative'
    end defaultvalue

    Then in your question event, check the hidden field, if it is 'Positive' unhide a question. Hope that helps. -- David
    jeropsUser is Offline
    river guide
    river guide
    Posts:99
    Avatar

    --
    09-11-2009 01:51 PM

    Dave,

    Thanks for the tip!!! Works great!!  Now I'm trying to figure out how to see if I can check if a date is in a range.

    So I would like to display the question if it was between 3/15/2010 and 4/15/2010  would this be the correct syntax?

    select case
    when datediff(day,getdate(),'3/15/2010') >= 0 and when datediff(day,getdate(),'4/15/2010') <=0 then 'Positive'
    else 'Negative'
    end defaultvalue

    Thanks again for your help, it's much appreciated.

    Jerry

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    09-13-2009 03:11 PM
    Hi, if you want to error trap for a date range, your SQL statement would look like this instead:

    select case
    when getdate() between '3/15/2010' and '4/15/2010 23:59:59' then 'Positive'
    else 'Negative'
    end defaultvalue

    -- David
    jeropsUser is Offline
    river guide
    river guide
    Posts:99
    Avatar

    --
    09-18-2009 06:53 PM

    When I use:

    select case
    when getdate() between '3/15/2010' and '4/15/2010 23:59:59' then 'Positive'
    else 'Negative'
    end defaultvalue

    It works great...but now I was trying to see if I could use a hidden field to replace the StartDate and EndDate like:

    select case when getdate() between '$(PARStartDate)' and '$(PAREndDate)' then 'Positive'
    else 'Negative' end DefaultValue

    I don't get a result..  Can this be done?  Am I using the right syntax?

    Thanks
    Jerry

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    09-20-2009 07:02 AM
    Yes, but a little more work. Try:

    select case when getdate() between ' '$(PARStartDate)'' and ''$(PAREndDate)'' then 'Positive'
    else 'Negative' end DefaultValue

    but make sure yur shortname '$(PAREEndDate)' also adds the time 23:59:59 to the end of it's value. You can use client side javascript for this purpose. -- David
    Alex WawoUser is Offline
    wading in the water
    wading in the water
    Posts:19
    Avatar

    --
    07-14-2010 07:00 PM
    Hi,

    I just wondering is there any way I can extend the Year from its default 1990-2030 to 1930-2030?
    My Dynamic form version is: 02.70.5 .
    Are the only option is by upgrading the Dynamic Form module?

    Thank you,
    Alex.
    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
     
     
       
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi