I'm trying to get rid of fixing date input by user on Date field in Orbeon forms.
I had formatted my Date field to DD/MM/YYYY and when I type:
44/07/2022
It automatically changes to 13/08/2022 (moves extra days to next month)
I just want to validate wrong input without "fixing" it and ask user to correct it by himself. Is it possible to disable this feature by prop or make any workarounds? I checked documentation and didn't find any clues.
Related
So I'm working on a form that makes use of database grids, I'm having an issue where I need to auto-default a field based upon the amount and GST fields. This will always auto-default my field for the user until the point where they manually change my field, at which point it obviously will not do anymore defaulting for that record.
Any ideas on how I can achieve the recognition of a manually modified field in Delphi? Please note I'm not talking about the manual modification of a record so the following code is not applicable to my situation (unless you can somehow find a way to use it).
Much appreciated!
Populate the value in the field when the amount or GST changes, and then calculate whatever the field is you want to auto-default. Allow the user to change it, and don't react to that change unless the user modifies the amount or GST again. You can use the TField.OnChange event (on the amount and GST fields) to do so.
I'm using Rails 4, and also Twitter Bootstrap.
I'd like to select the date with a date picker, but have a separately visible component for selecting the hour and minutes.
I've had a look at smalot bootstrap-datetimepicker https://github.com/smalot/bootstrap-datetimepicker , but looking at the Demo Page, they don't demonstrate any ability to show date and time separately. You have to choose date, and then later on choose time, which doesn't feel very intuitive.
I've also looked at Eonasdan bootstrap-datetimepicker https://github.com/Eonasdan/bootstrap-datetimepicker , but the time picking for it, even in inline mode, is not intuitive - will people know they can just click on the hour value to change it?
I'm thinking of just using a date picker for picking the date, and selecting the hour and minute myself, but it kind of feels wrong handing off part of a datetime to a gem/library and handling the rest of it myself.
I came across Separate date and time form fields in Rails , which is asking about this kind of problem, but it's a question from September 2010.
How do I select the date with a date picker, but have simple and immediately visible selection of time?
First, unless you find a plugin that does what you want off the rack, then yes, it's up to you to handle it, and yes, it feels kinda wrong - depending on how you do it.
Not sure what you had in mind, but the way it feels "the most wrong" is if your form has a single "date time" field under the hood, and you use javascript to botch together the date from the plugin and the time from your own setup, and store them in your datetime field. The nice thing about this is your rails app just gets a single datetime field and knows exactly what to do with it.
Here's how I'd approach it:
Keeping in mind that forms don't necessarily have to map 1-to-1 with your models, I'd split it in the controller layer, and conceptually think of "a form with two fields: date, and time", and then in your controller (or a form object, which is probably better for this situation) you'd stitch the date and time together, before saving them to your model. This approach means you can have separate validation on each field, which is probably also what you want (because I'd assume it's possible for users to input a valid date, but an invalid time or vica versa).
In terms of handling the date with a plugin and the time yourself, that's now fine - they're two completely separate fields from the perspective of your form, so there's nothing dirty about it. It just means you need the extra logic in your controller layer to split the datetime when you display the form, and merge the date and time back into one when you save the form.
Edit: if you haven't heard of form objects, check out https://github.com/apotonick/reform and http://railscasts.com/episodes/416-form-objects
I have separate date and time field: ie Start date , Start time, End date, End time. Im using jquery time picker, and date pair plugin.
If I fill either one of start date or end date, they will both be filled in with values automatically. And same in Start time and end time, they will be both filled in. So I am testing these scenarios:
Start date and End date are filled in with values. Start time and end time are blank. After clicking submit, I have the right error, no problem, but it is returning the start time and end time with values. which I dont want.
Start time and End time are filled in with values. Start date and end date are blank. After clicking submit, ofc I have the right error, no problem, but it is returning the start date and end date with values (ie: the date today). which I dont want.
I have a feeling this is the normal behaviour of jquery plugin time picker after failed submission, it will automatically set default values if left blank in first submission.
This is not a big deal to be honest, but Im just concern for better UX.
PLease help.
Inspect your form. It seems that the input fields have the same name, so if you fill start_date the form will pick this value and fill it into start_time.
I was able to solve it by simple using a jquery.
In a project we can create versions, but the release date format is just d/MMM/yy
Is it possible to have this display the time as well ?
Our datepicker properties are:
jira.date.picker.java.format d/MMM/yy
jira.date.picker.javascript.format %e/%b/%y
jira.date.time.picker.java.format dd/MMM/yy h:mm a
jira.date.time.picker.javascript.format %e/%b/%y %I:%M %p
we are running JIRA version 6.1.2, build 6157
realspirituals is right. With standard date field you won't be able to display a time.
Although opposing to the 'Configuring JIRA Options', I found 'Changing the Due Date Input Format', which states the possibility of adding a time component to the due date field. But I couldn't find something similar for Release Dates.
A similar feature request was raisied in May '13 to atlassian.
The only thing I can think of is to add metadata to your version and use a custom field to display it. See here: new field in version tab panel. This way you can further handle with it. If you just want to display the time and not "work" with it, just use the description field for that.
As per documentation
Date fields, which have no time component, such as due dates, release
dates (associated with versions) and custom date fields, solely record
date information (and no time zone-related information) so are not
affected by time zone settings.
My answer is Not possible and even if you print them, you should get 0's
I am using telerik date picker. Date format is dd/mm/yyyy. If user enters it as ddmmyyyy then also it will be converted into format as dd/mm/yyyy. Now if user enters something like ddmmyy i.e. if year is only of 2 digits then i want to throw error message for the same to enter date in valid format. Also this date field is not required. So want to show this message if wrong format of date is entered on blur event of date field.
From my experience and with this demo from the Telerik Site it works if you do ddmmyy or ddmmyyyy by default if you have it set to a culture that commonly uses that style. Ex. Canadian English or en-CA.
If you have have specified your format as "dd/mm/yyyy" then the user will have to enter it as so or it will appear incorrect. You could use some java script to convert it to a proper format, but it would be a lot easier to just set up the date picker properly.