Hi Wai,
When I add a date field to a form, the default date format is dd/mm/yyyy. I would like to change it to yyyy/mm/dd. Where can I do this?
I changed the system.dateformat=yyyy/mm/dd in the ufssetup.properties file. But it seems that the server does not take the system date from from there. I saw the startup log in the console still show system date format is dd/mm/yyyy. (The server does take that ufssetup.properties file as configuration file.)
I restarted the server several times. It still the same.
Thanks,
Xiaoli
how to change the date format from default to other format.
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 272
- Joined: Fri Dec 14, 2012 2:55 pm
- Location: Ottawa
-
- Moderator
- Posts: 421
- Joined: Fri Sep 07, 2007 3:44 pm
- Location: Sandy, UK
- Contact:
- Wai
- Moderator
- Posts: 165
- Joined: Wed Sep 12, 2007 9:04 am
- Location: Sandy, UK
- Contact:
-
- Ebase User
- Posts: 272
- Joined: Fri Dec 14, 2012 2:55 pm
- Location: Ottawa
calender after date field disappeared after clear the field.
Thank you both Steve and Wai.
I changed it to en_ZA. Then the format changes to yyyy/mm/dd.
Hi Wai, my other question is that when I click "clear" button to clear some fields value, the calender after the date field disappeared as well. Is there any settings wrong? (I copied the enquiry page and made some changes)
I changed it to en_ZA. Then the format changes to yyyy/mm/dd.
Hi Wai, my other question is that when I click "clear" button to clear some fields value, the calender after the date field disappeared as well. Is there any settings wrong? (I copied the enquiry page and made some changes)
0 x
- Wai
- Moderator
- Posts: 165
- Joined: Wed Sep 12, 2007 9:04 am
- Location: Sandy, UK
- Contact:
I think this is because the the Calender is applied by JQuery? Is this your CRCD system? If so, the calenders are styled using JQuery UI.
This will be as a result of having Ajax turned on for the form and using JQuery's document.ready (on the page - html++) to apply the calender.
The problem here is that javascript you place into the page's document.ready will only be applied when the whole page is redisplayed. This works when Ajax on the form is turned off. Therefore, any changes you make to the form (immediate validation), causes the page to refresh.
At the time of writing CRCD (4.4.1), there was no way around this except disabling the Ajax on the form.
However, in 4.4.2, we introduced a new JQuery event
The ready event
With Ajax enabled, you will need to move this part below into the HTML Element Properties of the control (date field)
This is found in HTML Element Properties - JQuery tab - Event drop down
Let me know how you get on.
This will be as a result of having Ajax turned on for the form and using JQuery's document.ready (on the page - html++) to apply the calender.
The problem here is that javascript you place into the page's document.ready will only be applied when the whole page is redisplayed. This works when Ajax on the form is turned off. Therefore, any changes you make to the form (immediate validation), causes the page to refresh.
At the time of writing CRCD (4.4.1), there was no way around this except disabling the Ajax on the form.
However, in 4.4.2, we introduced a new JQuery event
The ready event
For example, in the client script you may have had something like this which is added to the page:Most events run in response to a user interacting with the page, e.g. clicking a button. The ready event is different – it is run when the page first loads, or when a control is shown from a previously hidden state and when Ebase refreshes the control (if Ajax has been enabled). This event can therefore be used to manipulate the control for display before it’s shown to the user. Typical examples might be to alter its style/class attributes or to configure the control as a JQuery UI widget.
Code: Select all
$(document).ready(function(){
$(".datePicker").datepicker({
showOn: "both",
buttonText: '',
buttonImage: "samples/images/themes/calendar.gif",
buttonImageOnly: true,
dateFormat: 'yy/mm/dd',
showButtonPanel: false,
changeMonth: true,
changeYear: true
});
});
Code: Select all
$(".datePicker").datepicker({
showOn: "both",
//buttonText: 'Select Date',
buttonText: '',
buttonImage: "samples/images/themes/calendar.gif",
buttonImageOnly: true,
//dateFormat: 'dd/mm/yy',
dateFormat: 'yy/mm/dd',
showButtonPanel: false,
changeMonth: true,
changeYear: true
});
Let me know how you get on.
0 x
-
- Ebase User
- Posts: 272
- Joined: Fri Dec 14, 2012 2:55 pm
- Location: Ottawa
- Wai
- Moderator
- Posts: 165
- Joined: Wed Sep 12, 2007 9:04 am
- Location: Sandy, UK
- Contact:
-
- Ebase User
- Posts: 272
- Joined: Fri Dec 14, 2012 2:55 pm
- Location: Ottawa
- Wai
- Moderator
- Posts: 165
- Joined: Wed Sep 12, 2007 9:04 am
- Location: Sandy, UK
- Contact:
-
- Ebase User
- Posts: 37
- Joined: Wed Mar 13, 2013 11:33 am
- Contact:
Hi, im having the same problem as xren was.
I've got a date field that needs to be in the format yyyy/mm/dd and im using a jquery datepicker to enter the date (that works fine) but then if i click any other button on the page then an error message pops up saying that the date format is dd/mm/yyyy. so i went in into internationalisation options and set english (south africa) as a default as it has the short date i wanted but i still get the same error message
any ideas?
I've got a date field that needs to be in the format yyyy/mm/dd and im using a jquery datepicker to enter the date (that works fine) but then if i click any other button on the page then an error message pops up saying that the date format is dd/mm/yyyy. so i went in into internationalisation options and set english (south africa) as a default as it has the short date i wanted but i still get the same error message

any ideas?
0 x
- Wai
- Moderator
- Posts: 165
- Joined: Wed Sep 12, 2007 9:04 am
- Location: Sandy, UK
- Contact:
-
- Ebase User
- Posts: 37
- Joined: Wed Mar 13, 2013 11:33 am
- Contact:
Who is online
Users browsing this forum: No registered users and 24 guests