Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » CalendarCtrl » DropDate problem?
DropDate problem? [message #25912] Fri, 19 March 2010 11:09 Go to next message
coolman is currently offline  coolman
Messages: 114
Registered: April 2006
Location: Czech Republic
Experienced Member
Hello.

I've got problem with DropDate function. When I select new date from Calendar I got invalid date. Calendar returns Time instead of Date.

How can I solve this problem?

Thanks, Radek

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

GUI_APP_MAIN
{
	TopWindow win;
	DropDate dd;

	dd <<= GetSysDate();
	
	win.Add(dd.HSizePos().TopPos(0, Ctrl::STDSIZE));
	win.Run();
}

Re: DropDate problem? [message #25913 is a reply to message #25912] Fri, 19 March 2010 13:12 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
coolman wrote on Fri, 19 March 2010 11:09


How can I solve this problem?


Hello, Radek.

This happen because of changes at 2199 revision.
Now, you can revert them, apply Truncate function for your DropDate instance or do it in your own way.
dd.Truncate();

[Updated on: Fri, 19 March 2010 13:43]

Report message to a moderator

Re: DropDate problem? [message #25956 is a reply to message #25912] Mon, 22 March 2010 07:40 Go to previous messageGo to next message
coolman is currently offline  coolman
Messages: 114
Registered: April 2006
Location: Czech Republic
Experienced Member
Thanks for the answer.

Radek
Re: DropDate problem? [message #26005 is a reply to message #25956] Thu, 25 March 2010 00:42 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 693
Registered: December 2005
Location: Budapest, Hungary
Contributor
It would be better to fix the real bug in Calendar class declaration from
virtual Value GetData() const			{ return sel;          }

to
virtual Value GetData() const			{ if(time_mode) return sel; else return (Date)sel; }
Re: DropDate problem? [message #26086 is a reply to message #26005] Wed, 31 March 2010 11:21 Go to previous message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Done. Tonigth in svn Smile
Previous Topic: StrToDate(Date& d, const char *s, Date def)
Next Topic: DropTime and WhenAction() problem
Goto Forum:
  


Current Time: Fri Mar 29 14:19:33 CET 2024

Total time taken to generate the page: 0.00985 seconds