Home | Free Lite Version | Buy Now | Free Bonuses | Free Stuff | Links



Popup Calendar Dialog

The xDialog Popup Calendar is the perfect solution when you need users of you application to enter dates. Letting them type in dates is not a good idea because they may not always enter them in the correct format. The popup calendar solves this problem, giving you complete control over the format of the dates. Plus it is much more user friendly.

You can choose to have dates returned in US, EU and ISO formats. See some example code below.

Download Demo Application to see it in action.

 

This example assumes that the xDialog functions have been added to the Global functions. You can easily do this using the Add Code button on the Script Editor.

Example


-- Get the existing date from the input object and pass it to the function
-- This will make this date the selected date when the calendar opens

SetDate = Input.GetText("Date")

-- If the input is empty, pass "TODAY" which will make the selected date on the calendar today's date
if SetDate == "" then
   SetDate = "TODAY"
end
   
-- Show the popup calendar
Date = xDialog.Show_Calendar("Please choose a date", SetDate, "US")

if Date ~= "CANCEL" then
   Input.SetText("Date", Date)
end
 

Copyright © 2007 All Rights Reserved