Date Control in future version?

Are there any plans to add a Date Field Type to Xojo? I’m well aware of available plugins for this.

As opposed to the currently existing DATE object datatype?

Have you tried using a Mask with the existing TextField?

Set the Mask to ##/##/####
Set the Cue Text to “MM/DD/YYYY”

Works like a charm.

I mean a GUI field property that formats dates properly and lets the data entry user pick a date from a popup calendar.

thats a “control” not a datatype… and there are dozens of 3rd party versions, giving you choices and flexiiblty that perhaps an in-bullt one would not provide…

and remember a DATE can be expressed in 100’s of different ways across dozens of locales

There is a free version (search the forum), there are commercial plugins.

Don’t you think Xojo has more important things to do than to compete with their own user base and third market?

Sorry about the incorrect terms used in the original Subject of this thread. Controls and Field Types are the same in Filemaker and I’ve been in that world the last few days for a client.

Anyway, I’m just used to seeing Filemaker occasionally change in ways that break existing plugins, and was concerned that might happen in the Xojo world too. So I wondered if this type of control is planned to be native to Xojo in the future.

I was planning on buying such a Xojo plugin if I’m told it isn’t planned on being native.

Look up a control by Mike Cotrone… my understanding is that it is a excellent Date/Time control and I think its free
and he attacked most (if not all) of the localization issues

Mike’s is excellent and full featured. I also used an adapted version of @Jay Menna’s and I am currently using an adapted version @Alex von Siebenthal’s in my current web app project. All these are free, and can be found on the forum.

To answer the OP, no, I wouldn’t expect to see a Date Control included in Xojo any time soon.

Great info. Thanks to all.

Björn has a DateControl:
http://einhugur.com/Html/DateControl/index.html

Thanks, Christian. But I failed to mention I need this for Web apps, and it appears that Einhugur plugins don’t support that.

GraffitiSuite has a DatePicker for Web apps.
DatePicker isn’t sold separately, but GraffitiSuite Web Edition has a lot of very nice classes
If you only want the DatePicker, GraffitiSuite will be overkill and too expensive.

You can contact @Anthony Cyphers for more information.

It’s easy to create your own web calendar with a container and WebStyles. Here is an example of a popup calendar that I did some time ago with only Xojo code (no plugin needed). There are several points that can be improved or adapted (use the new framework for Date…) , but it works well for my needs.

WebCalender.zip
This gives you a starting point, you can also use it as is…

[quote=348650:@Tim Jones]Have you tried using a Mask with the existing TextField?

Set the Mask to ##/##/####
Set the Cue Text to “MM/DD/YYYY”

Works like a charm.[/quote]

It’s been a while since you suggested this. Since I’m doing this with a Web app, this suggestion wouldn’t work for me. No Mask function in that edition of Xojo. But I came full circle back to this today, after playing with Alain Clausen’s solution a while. For a popup, I like it the best, as it’s all done in Xojo and is easily modifiable. The reason I’m specifically replying to you, is that I have done something similar to your suggestion, using ParseDate in the field’s LostFocus event:

Dim d As New Date If ParseDate(Me.Text, d) Then Me.Text = d.ShortDate Else Me.Text = "" End If

Not the charm of a date picker, but it keeps the text entered just the way I want it.

Awesome. Never heard about ParseDate as I started with Xojo in 2016 (defaulting to Xojo.Core).

Had to click through a lot of forum posts on problems with interpreting dates before I found this gem.

Cheers!