Change Date Format in Calendar Control Date field
I have a date field in my custom form that is not bound to any item type. The Calendar Control Time selection is disabled by default as the default format is Short date. How do i change this to long date so the time selection is enabled?14KViews0likes7CommentsDate field not get disabled
Hi, I am trying to disable date field when item is locked, I did something like this: Method is hooked on form event "OnFormpopulated" var isItemLocked = thisItem.isLocked(); var transfer_date = getFieldByName("transfer_date"); if(isItemLocked) { transfer_date.getElementsByTagName("input")[0].disabled = true; transfer_date.getElementsByTagName("input")[1].disabled = true; transfer_date.getElementsByTagName("input")[1].src = "../images/calendar-disabled.svg"; } Reference from : gist.github.com/.../bb83b790e66d1977eeb09b1769c5a61c so, when I locked item then date field won't get disabled, and if I unlock it and again lock it then it works fine i.e date field gets disabled. I debug the code but the behavior is same when Item is locked first time and second time. I tried this on IE, Chrome and Firefox but the got same results. Regards, Maddy.7KViews0likes3CommentsHow to find the date difference from 2 fields.
Hi i have a question and i would really love to get help. i currently allow user to select a start and a end date. with this information i want to calculate the number of days. I have tried coding this myself but i keep getting errors. string startDtStr = this.getProperty("start_date",""); string endDtStr = this.getProperty("end_date",""); if (startDtStr =="" || endDtStr=="") { return inn.newError("Select a Start and a End Date"); } DateTime startDt = DateTime.Parse(startDtStr); DateTime endDt = DateTime.Parse(endDtStr); string durationStr = this.getProperty("duration"); int duration = (int)(endDt - startDt).TotalDays It gives me a number of errors and it just doesnt like the code. Can someoene please help me. Thank you.Solved5.2KViews0likes2CommentsHow to search for 'Yesterday'?
I want to find all part Items with a created_on date of Today - easy. Now I want to Save this search to the TOC so users can run it daily - not so easy. I am trying to search for "Yesterday" in a date field, using AML. this: <Item type="Part" action="get" page="1" pagesize="200" maxRecords="" returnMode="itemsOnly"> <created_on condition="gt">yesterday</created_on> <created_on condition="lt">tomorrow</created_on> <generation condition="ge">1</generation> </Item> In my OnBeforeGet, I find the value "Yesterday" and substitute it for yesterday's date. this: <Item type="Part" action="get" page="1" pagesize="200" maxRecords="" returnMode="itemsOnly"> <created_on condition="gt">2019-05-02T00:00:00</created_on> <created_on condition="lt">2019-05-02T23:59:59</created_on> <generation condition="ge">1</generation> </Item> If I return this, then I get the error: <SOAP-ENV:Envelope> -<SOAP-ENV:Body> -<SOAP-ENV:Fault> <faultcode>SOAP-ENV:Server</faultcode> <faultstring>String was not recognized as a valid DateTime.</faultstring> -<detail> <af:legacy_detail>String was not recognized as a valid DateTime.</af:legacy_detail> <af:exception message =" String was not recognized as a valid DateTime. " type =" System.FormatException " /> </detail> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope> 1) Can anyone explain how the system checks if the DateTime value is valid? 2) Is there an elegant, reusable way to perform this functionality? I have created a new Item, using an OnGet method to return todays parts, but this is a lot of effort for a relatively simple requirement. It is not reusable and it does not address why the above approach does not work. Many thanks, Martin.4.5KViews0likes1CommentDate - Display - Working days
Hi everyone... When i use the project management the date is displayed as like "Month/Date/Year". Is there any solution to like this "Date/Month/Year".? when assigning activities with date to any Identities Aras Scheduler takes "Saturday and Sunday" as holiday. It is not suitable for every company. By default can i set "Sunday" as holiday? Thanks. Regards, SATHISHKUMAR C.4.2KViews0likes2CommentsWhat is the correct way to parse DateTime on a server side onAfterGet event?
Hi everyone. I'm currently trying to evaluate the current date and a date property however, when I try do parse the string provided by getProperty, it gives me the error: String was not recognized as a valid DateTime. I can confirm the property is of the Type: Date and Pattern: Short Date. My relevant code: [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:5ea4aa05-9cf8-4f39-aaab-d8f235e33c77:type=text&text=for%20%28int%20i%20%3D%200%3B%20i%20%3C%20this.getItemCount%28%29%3B%20i%2B%2B%29%0D%0A%7B%0D%0A%20%20%20%20Item%20thisItem%20%3D%20this.getItemByIndex%28i%29%3B%0D%0A%20%20%20%20%0D%0A%20%20%20%20string%20dateStr1%20%3D%20thisItem.getProperty%28%22_calibrated_next%22%2C%22%22%29%3B%0D%0A%20%20%20%20DateTime%20date1%20%3D%20DateTime.Parse%28dateStr1%29%3B%0D%0A%7D] The only thing that I can think of that may cause this error is the date format conversion when localized from neutral UTC, but I couldn't find much in the Aras documentation related to this. ThanksSolved4KViews0likes4CommentsReport Date Format
Good day all. I am trying to set up a custom report that will return the item_number, name, & revision_date for documents. The information is eing output, but the revision_date includes the time. How do I set it so it will only include the date? Thanks for the help.1.3KViews0likes0CommentsGetting name property mismatch error while changing data type - Text to Date
The Property has data type Text and we are trying to set to Date on that time we are getting : - does not match the required 'name' property pattern: ^[a-zA-Z](\w*| +\w+)*$]] Request: <Item type="ItemType" id="5738793931D64D938F02558135C20FE8" action="add" doGetItem="0"><Relationships><Item type="Property" id="41C87DE9CAC2484DBE736F80016D1C87" action="add"><data_type>date</data_type><pattern>short_date_time</pattern></Item></Relationships></Item> Response: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault xmlns:af="http://www.aras.com/InnovatorFault"><faultcode>SOAP-ENV:Server.PatternMismatchException</faultcode><faultstring><*$]]></faultstring><detail><af:legacy_detail><*$]]></af:legacy_detail><af:exception message="The specified value () does not match the required 'name' property pattern: ^[a-zA-Z](\w*| +\w+)*$" type="Aras.Server.Core.PatternMismatchException" /><af:item type="ItemType"><af:property name="name" value="" /></af:item></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>Solved0Views0likes2Comments