How can i change yui calendar error message? - yui

I have a problem with YUI 2 calendar. I activated the year selection property of it, and when the user enters a wrong type of year(for example 19m9,aaaa,bbbb), it writes "year needs to be number". How can i change this message, for example "not a valid year or enter a valid year", without changing default js file of calendar? I can change weekday names with
calendar.cfg.setProperty("WEEKDAYS_MEDIUM", ["Son", "Mon", "Die", "Mit", "Don", "Fre", "Sam"]);
but itis not working for changing error message.
Thanks.

The navigator can be configured when creating a Calendar, and the invalidYear message is part of the configuration object:
http://developer.yahoo.com/yui/docs/YAHOO.widget.Calendar.html#config_navigator
Hope that helps,
Satyen

Related

Kentico - Not able to save the DateTime in "DD/MM/YYYY" format

I am working on Kentico 12 MVC Site in version 12.0.59 and default culture set to "en-AU".
I have created a Form named "Sample Form".
When I am trying to save the datetime in either "MM/DD/YYYY" or "YYYY/MM/DD" it works correctly and saves the data in the database for the form.
But when I try to save the datetime in format "DD/MM/YYYY" and click on Submit button to save the data in database, it shows the error as follows:
Can anyone please suggest for the same?
Thanks
One potential reason for that is a missing culture setting for the current thread in the code. It is not enough just to select the default culture "en-AU" in the Kentico admin interface. In the code before processing your request you should set the desired culture for the thread as well:
Thread.CurrentThread.CurrentUICulture = yourDefaultOrSelectedCulture;
Thread.CurrentThread.CurrentCulture = yourDefaultOrSelectedCulture;
In Kentico example Dancing Goat MVC website you can see this implemented in MultiCultureMvcRouteHandler.cs code file.

Maximo 7.6 Change status dialog box (Notification E-mail field) default blank

Seeking for guidance, in Maximo 7.6 the change status dialog box has a field (toemailaddr) Label: Notification E-mail for work Order change status. See the picture below.
What I am seeking guidance on is how do I edit that field to where I make it to default blank over populating the user logged in e-mail by default? Is this even possible?
I have looked in the change status dialog on WOTRACK as well extracted Library.XML and did not find a way to change from it filling in by default with users e-mail to just remaining blank.
I apologize in advance if it shows to be tagged incorrectly.
Picture of what I am looking to change to show blank
It's the Maximo "psdi.app.workorder.virtual.WOChangeStatus" MBO class that is defaulting that value in.
If the presentation-level default values run after the MBO add() code, then a simple presentation "Default Value" control should allow you to override that.
If that doesn't work then you can try an automation script. It would need to be against the WOCHANGESTATUS object and on the "add" action. If that runs after the Java code then you could grab that field (toEmailAddr) and set it back to an empty string. I assume the screen would still update with that change.
I have not looked at the code for any downstream effects clearing this field might have. It could be that Maximo is coded to always send out that email and if the email address is empty it would likely error at that point.
create an automation script named WOCHANGESTATUS.NEW
(automation scripts that are named after a mbo followed by .NEW are executed when a new instance of a MBO is created, they can be used to initialize column values. )
put a single line in the script.
mbo.setValueNull("TOEMAILADDR")
mark script active and save it

require format for text input in slack dialog

I recently got into making dialogues for my Slack application and was wondering how to take text input from a user with a required formatting style. I have seen apps like EventBot do this when you try to make a new event it opens up a dialogue and a text input line asks you for Date & Time in the specific format MM/DD/YY HH:mm am/pm. If you don't follow this formatting a little red warning appears below the text box when you try to submit the dialogue.
I can't seem to find any documentation as to how to throw this warning when a user doesn't follow your formatting and haven't seen any attribute for getting a date from the user.
Does anyone know what method to call or what attribute I need to include to make this kind of restriction?
-Thank you
This works a bit differently. There is no API to call.
Instead, your apps needs to evaluate the user input (after the dialog is submitted) and can then respond with an error message to Slack if necessary. That error message is then displayed in the Dialog.
Here is the relevant part of the official documentation:
If your app finds any errors with the submission, respond with an
application/json payload describing the elements and error messages.
The API returns these errors to the user in-app, allowing the user to
make corrections and submit again.
And here is the example for a response from the official documentation:
{
"errors": [
{
"name": "email_address",
"error": "Sorry, this email domain is not authorized!"
},
{
"name": "username",
"error": "Uh-oh. This username has been taken!"
}
]
}

SharePoint List is giving error message "Unable to render data"

I have a SharePoint list filtered by "key Filters", when I change the value in "Dashboard" view, and click on "Stop editing", it is giving me an error message below
Unable to render data. if the problem persists, contact your system administrator. Correlation ID: xxxxxxxxxxxxxxxxx
It was working till last one hour, I was trying to create different views.
Try to add a connection to your database for "AUTORITE NT\IUSR"
First time I had this error it saved me.
But now, i'm facing this issue again and can't find a solution. So if you find another one, let us know ;)
Edit: Incredible... I just set CustomError to "Off" instead of "RemoteOnly", had same error. After Reboot server it starts working..
Just do an iisreset and try again

CRM 2011 javascript onchange event not working for system field in another organisation

I have some javascript code attached to the accounts entity. This code sets the requirement level of the primary contact attribute based on the value of a custom option set field showing various account types. This was developed on one server, where it worked, and so the solution was imported into another organisation where it now doesnt work.
It seems to be only on this field as i have changed the code to look at another field and that works fine. The error it gives is that the "Object doesn't support this property or method". Also what is strange is that the field doesn't appear in the list under the entity within the solution despite it being a system field.
The code i'm using is:
Xrm.Page.getAttribute("primarycontactid").setRequiredLevel("required");
Can anyone help me figure out what it's doing?
Thanks
EDIT: Found that the code is actually making the field required despite the error, but it's not displaying the * next to it. Also if I make the field required in it's settings then it does the same thing

Resources