Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, August 16, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: SalesLogix DateTimePicker
Tony Joanes
Posts: 71
 
SalesLogix DateTimePickerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Oct 08 10:27 AM
Hi all

Anyone tried to use the datetimepicker and have keep setting back to the current date after every postback?

My other controls keep state but this slx datetime picker resets to the current date.

I have set EnableViewState to true. I am doing an auto postback on these date pickers.

Might just end up accessing viewstate and updating the date picker when the page posts back.

Any suggestions?

Thanks

Tony
[Reply][Quote]
Harendra Sinha
Posts: 66
 
Re: SalesLogix DateTimePickerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Oct 08 11:48 AM
Try this on AXFormChange()..

dateTimePicker.Date = now

-Harendra
[Reply][Quote]
Tony Joanes
Posts: 71
 
Re: SalesLogix DateTimePickerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Oct 08 3:16 AM
Thanks for the suggestion.

My problem is that the user changes the date in the picker causing the form to postback but instead of the date time picker holding the date that has been selected it resets back to the current date (I want it to keep the selected date). This works fine with the other ASP controls but not the SLX datetimepicker control.
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: SalesLogix DateTimePickerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Oct 08 4:58 AM
Is the datepicker properly bound? It should keep its value if its bound - Ive never seen a datapicker not keep its date before...
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: SalesLogix DateTimePickerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Oct 08 4:58 AM
Is the datepicker properly bound? It should keep its value if its bound - Ive never seen a datepicker not keep its date before...
[Reply][Quote]
Tony Joanes
Posts: 71
 
Re: SalesLogix DateTimePickerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Oct 08 5:07 AM
That could explain it. I dont have it bound to anything as I am just using so that users can select dates rather than let them free type dates.

[Reply][Quote]
Tony Joanes
Posts: 71
 
Re: SalesLogix DateTimePickerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Oct 08 3:38 AM
Still not working so back to the drawing board!
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: SalesLogix DateTimePickerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Oct 08 3:15 PM
You'll either have to bind the controls, or if that isn't possible set the value in a LoadAction with repaint event = true. You'll likely need to persist the selected value between refreshes/postbacks. You can persist the value in the state of the WorkItem for the page.

this.PageWorkItem.State["SelectedDate"] = dteMyDateTimePicker.DateTimeValue;


-Ryan
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: SalesLogix DateTimePickerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Oct 08 4:21 AM
I am still confused about this one. I have bound at least 50 datepicker controls and never seen this. Is it bound to a date field?? Are you doing anything on the postback, as you have set the autopostback to true. Do you really need a postback? Are there any loadactions or any code that runs when you postback to set the entity value that the datepicker is bound to to a different date?
[Reply][Quote]
Tony Joanes
Posts: 71
 
Re: SalesLogix DateTimePickerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Oct 08 6:06 AM
I'm still confused too

I haven't got it bound to any date fields. It is in a custom smart part and is being used so that a user can select a date which is then used in a filter. I set the date to YTD when the page loads and this works fine. I have set autopostback to false now to see what happens and once I do postback the page the date is set to current date again. I have got anything in my code that does this. The state of my other controls is held without issue.

All I do when when the page loads is use the date value of the datepicker to filter the results of my History data. This does actually work with the correct dates but somewhere the date gets set back to current date once the page finishes loading.
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: SalesLogix DateTimePickerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Oct 08 6:23 AM
Quote:
Originally posted by Tony Joanes

I'm still confused too

I haven't got it bound to any date fields. It is in a custom smart part and is being used so that a user can select a date which is then used in a filter. I set the date to YTD when the page loads and this works fine. I have set autopostback to false now to see what happens and once I do postback the page the date is set to current date again. I have got anything in my code that does this. The state of my other controls is held without issue.

All I do when when the page loads is use the date value of the datepicker to filter the results of my History data. This does actually work with the correct dates but somewhere the date gets set back to current date once the page finishes loading.


Ah I understand what you are trying to do now!! Never had to use a datepicker control in this way before so it may well be a behaviour of the SLX Datepicker control to revert to todays date. I would set the current value into state on the autopostback/change event of the datepicker (as per Ryans example), then further on in the page lifecycle (Page_PreRender should do) set the value of the datepicker control to the value from state. In the PreRender event check if state is empty, if so set it to blank or todays date, whatever behaviour you need...

protected void Page_PreRender()
{
//
}

Thanks,
Nick
[Reply][Quote]
Tony Joanes
Posts: 71
 
Re: SalesLogix DateTimePickerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Oct 08 6:49 AM
Even when I use ViewState I cannot set the datapicker.

I have stepped through the code and watched the values be set for the date picker only to see the webpage set the date back to the current datetime.

I even tried putting a button on the page to set the date but it stays at the current date.

Time for some textboxes!

I think SLX behaviour is doing something that I can't control.
[Reply][Quote]
Jose Urena
Posts: 92
 
Re: SalesLogix DateTimePickerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 Nov 08 4:21 PM
I'm having the same problem...

I used a datetimepicker from saleslogix because i made a Dashboard for web, cause 7.2 don't have dashboard...

I can set te value until i change the value of the datetimepicker control... from that moment the control always will set itself back to today's date.

The control is not binded to anything... only for control.

I'm guessing i need to call the picker in a custom way to set a textbox?
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 8/16/2025 7:39:06 PM