US DateTime Format with PrimeFaces 6.2 issue
I just upgraded PrimeFaces from 4.2 to 6.2 and I immediately noticed a malfunction of the calendar.
In practice when I have the date format set to MMM dd, yyyy hh: mm a the popup button for inserting is no longer displayed.
This is my calendar component in .xhtml page
<p:calendar value="#{pakVeFormA.endDate}"
pattern="#{languageBean.dtPatterns[languageBean.local]}"
mindate="#{pakVeFormA.today}"
showOn="button" showButtonPanel="true"
readonlyInput="true" timeZone="Asia/Karachi"/>
Where pattern is 'MMM dd, yyyy hh:mm a'
In console appears 'Uncaught Wrong time format'
I noticed that by removing the pattern or mindate the popup button appears correctly.
So I've tried to format the new Date() in pakVeFormA Bean but nothing change.
I've also tried to inject the min date with static string like ' mindate="Jan 03, 2019 08:00 PM"' but nothing change also this time.
Finally i tried to change pattern to 'MMM dd, yyyy HH:mm' and the calendar work without problem but i need the AM/PM format
Thanks to all
UPDATE:
I replicate the test case.
This is the bean
@ManagedBean(name = "testFormBean")
@ViewScoped
public class TestFormBean implements Serializable {
private static final long serialVersionUID = 1L;
private Date today;
private Date selectedDate;
@PostConstruct
public void init() {
today=new Date();
}
public Date getToday() {
return today;
}
public void setToday(Date today) {
this.today = today;
}
public Date getSelectedDate() {
return selectedDate;
}
public void setSelectedDate(Date selectedDate) {
this.selectedDate = selectedDate;
}
}
And this is the component
<p:calendar value="#{testFormBean.selectedDate}"
pattern="MMM dd, yyyy hh:mm a"
mindate="#{testFormBean.today}"
showOn="button" showButtonPanel="true"
readonlyInput="true" timeZone="Asia/Karachi"/>
But still not working. If i remove mindate property, all works
primefaces calendar datetime-format
add a comment |
I just upgraded PrimeFaces from 4.2 to 6.2 and I immediately noticed a malfunction of the calendar.
In practice when I have the date format set to MMM dd, yyyy hh: mm a the popup button for inserting is no longer displayed.
This is my calendar component in .xhtml page
<p:calendar value="#{pakVeFormA.endDate}"
pattern="#{languageBean.dtPatterns[languageBean.local]}"
mindate="#{pakVeFormA.today}"
showOn="button" showButtonPanel="true"
readonlyInput="true" timeZone="Asia/Karachi"/>
Where pattern is 'MMM dd, yyyy hh:mm a'
In console appears 'Uncaught Wrong time format'
I noticed that by removing the pattern or mindate the popup button appears correctly.
So I've tried to format the new Date() in pakVeFormA Bean but nothing change.
I've also tried to inject the min date with static string like ' mindate="Jan 03, 2019 08:00 PM"' but nothing change also this time.
Finally i tried to change pattern to 'MMM dd, yyyy HH:mm' and the calendar work without problem but i need the AM/PM format
Thanks to all
UPDATE:
I replicate the test case.
This is the bean
@ManagedBean(name = "testFormBean")
@ViewScoped
public class TestFormBean implements Serializable {
private static final long serialVersionUID = 1L;
private Date today;
private Date selectedDate;
@PostConstruct
public void init() {
today=new Date();
}
public Date getToday() {
return today;
}
public void setToday(Date today) {
this.today = today;
}
public Date getSelectedDate() {
return selectedDate;
}
public void setSelectedDate(Date selectedDate) {
this.selectedDate = selectedDate;
}
}
And this is the component
<p:calendar value="#{testFormBean.selectedDate}"
pattern="MMM dd, yyyy hh:mm a"
mindate="#{testFormBean.today}"
showOn="button" showButtonPanel="true"
readonlyInput="true" timeZone="Asia/Karachi"/>
But still not working. If i remove mindate property, all works
primefaces calendar datetime-format
Can you try a 6.3 snapshot btw? Iirc some things were changed in between
– Kukeltje
Jan 7 at 10:23
Where can I find 6.3 .jar ?
– Rosa Fago
Jan 7 at 11:12
Source, build a snapshot yourself
– Kukeltje
Jan 7 at 11:13
The bug reported below has been fixed and will be in PF 6.3 upcoming release.
– Melloware
Jan 10 at 12:09
add a comment |
I just upgraded PrimeFaces from 4.2 to 6.2 and I immediately noticed a malfunction of the calendar.
In practice when I have the date format set to MMM dd, yyyy hh: mm a the popup button for inserting is no longer displayed.
This is my calendar component in .xhtml page
<p:calendar value="#{pakVeFormA.endDate}"
pattern="#{languageBean.dtPatterns[languageBean.local]}"
mindate="#{pakVeFormA.today}"
showOn="button" showButtonPanel="true"
readonlyInput="true" timeZone="Asia/Karachi"/>
Where pattern is 'MMM dd, yyyy hh:mm a'
In console appears 'Uncaught Wrong time format'
I noticed that by removing the pattern or mindate the popup button appears correctly.
So I've tried to format the new Date() in pakVeFormA Bean but nothing change.
I've also tried to inject the min date with static string like ' mindate="Jan 03, 2019 08:00 PM"' but nothing change also this time.
Finally i tried to change pattern to 'MMM dd, yyyy HH:mm' and the calendar work without problem but i need the AM/PM format
Thanks to all
UPDATE:
I replicate the test case.
This is the bean
@ManagedBean(name = "testFormBean")
@ViewScoped
public class TestFormBean implements Serializable {
private static final long serialVersionUID = 1L;
private Date today;
private Date selectedDate;
@PostConstruct
public void init() {
today=new Date();
}
public Date getToday() {
return today;
}
public void setToday(Date today) {
this.today = today;
}
public Date getSelectedDate() {
return selectedDate;
}
public void setSelectedDate(Date selectedDate) {
this.selectedDate = selectedDate;
}
}
And this is the component
<p:calendar value="#{testFormBean.selectedDate}"
pattern="MMM dd, yyyy hh:mm a"
mindate="#{testFormBean.today}"
showOn="button" showButtonPanel="true"
readonlyInput="true" timeZone="Asia/Karachi"/>
But still not working. If i remove mindate property, all works
primefaces calendar datetime-format
I just upgraded PrimeFaces from 4.2 to 6.2 and I immediately noticed a malfunction of the calendar.
In practice when I have the date format set to MMM dd, yyyy hh: mm a the popup button for inserting is no longer displayed.
This is my calendar component in .xhtml page
<p:calendar value="#{pakVeFormA.endDate}"
pattern="#{languageBean.dtPatterns[languageBean.local]}"
mindate="#{pakVeFormA.today}"
showOn="button" showButtonPanel="true"
readonlyInput="true" timeZone="Asia/Karachi"/>
Where pattern is 'MMM dd, yyyy hh:mm a'
In console appears 'Uncaught Wrong time format'
I noticed that by removing the pattern or mindate the popup button appears correctly.
So I've tried to format the new Date() in pakVeFormA Bean but nothing change.
I've also tried to inject the min date with static string like ' mindate="Jan 03, 2019 08:00 PM"' but nothing change also this time.
Finally i tried to change pattern to 'MMM dd, yyyy HH:mm' and the calendar work without problem but i need the AM/PM format
Thanks to all
UPDATE:
I replicate the test case.
This is the bean
@ManagedBean(name = "testFormBean")
@ViewScoped
public class TestFormBean implements Serializable {
private static final long serialVersionUID = 1L;
private Date today;
private Date selectedDate;
@PostConstruct
public void init() {
today=new Date();
}
public Date getToday() {
return today;
}
public void setToday(Date today) {
this.today = today;
}
public Date getSelectedDate() {
return selectedDate;
}
public void setSelectedDate(Date selectedDate) {
this.selectedDate = selectedDate;
}
}
And this is the component
<p:calendar value="#{testFormBean.selectedDate}"
pattern="MMM dd, yyyy hh:mm a"
mindate="#{testFormBean.today}"
showOn="button" showButtonPanel="true"
readonlyInput="true" timeZone="Asia/Karachi"/>
But still not working. If i remove mindate property, all works
primefaces calendar datetime-format
primefaces calendar datetime-format
edited Jan 7 at 9:39
Rosa Fago
asked Jan 3 at 16:00
Rosa FagoRosa Fago
125
125
Can you try a 6.3 snapshot btw? Iirc some things were changed in between
– Kukeltje
Jan 7 at 10:23
Where can I find 6.3 .jar ?
– Rosa Fago
Jan 7 at 11:12
Source, build a snapshot yourself
– Kukeltje
Jan 7 at 11:13
The bug reported below has been fixed and will be in PF 6.3 upcoming release.
– Melloware
Jan 10 at 12:09
add a comment |
Can you try a 6.3 snapshot btw? Iirc some things were changed in between
– Kukeltje
Jan 7 at 10:23
Where can I find 6.3 .jar ?
– Rosa Fago
Jan 7 at 11:12
Source, build a snapshot yourself
– Kukeltje
Jan 7 at 11:13
The bug reported below has been fixed and will be in PF 6.3 upcoming release.
– Melloware
Jan 10 at 12:09
Can you try a 6.3 snapshot btw? Iirc some things were changed in between
– Kukeltje
Jan 7 at 10:23
Can you try a 6.3 snapshot btw? Iirc some things were changed in between
– Kukeltje
Jan 7 at 10:23
Where can I find 6.3 .jar ?
– Rosa Fago
Jan 7 at 11:12
Where can I find 6.3 .jar ?
– Rosa Fago
Jan 7 at 11:12
Source, build a snapshot yourself
– Kukeltje
Jan 7 at 11:13
Source, build a snapshot yourself
– Kukeltje
Jan 7 at 11:13
The bug reported below has been fixed and will be in PF 6.3 upcoming release.
– Melloware
Jan 10 at 12:09
The bug reported below has been fixed and will be in PF 6.3 upcoming release.
– Melloware
Jan 10 at 12:09
add a comment |
1 Answer
1
active
oldest
votes
Issue has been reproduced and a bug has been submitted on PF GitHub page:
https://github.com/primefaces/primefaces/issues/4366
Update 01/10/2019: The bug has been fixed and will be in PF 6.3
Using 6.2 Community Edition.
– Melloware
Jan 3 at 20:44
can you show me your bean and your page ? So i can compare the date...
– Rosa Fago
Jan 4 at 17:20
I updated my answer above to include the Calendar snippet I used. If you want to create a small reproducible test case just clone this tiny project: github.com/primefaces/primefaces-test and you can run it withmvn clean jetty:run-exploded
. If you can reproduce it with that small sample I suggest submitting a bug on the GitHub issues page.
– Melloware
Jan 4 at 18:11
@RosaFago: you shoyld post Minimal, Complete, and Verifiable example with which we can compare...
– Kukeltje
Jan 4 at 19:02
I've update the description. In your example there is no mindate property, can you pls add and make a try ? Thx so much
– Rosa Fago
Jan 7 at 9:00
|
show 1 more comment
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54025799%2fus-datetime-format-with-primefaces-6-2-issue%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Issue has been reproduced and a bug has been submitted on PF GitHub page:
https://github.com/primefaces/primefaces/issues/4366
Update 01/10/2019: The bug has been fixed and will be in PF 6.3
Using 6.2 Community Edition.
– Melloware
Jan 3 at 20:44
can you show me your bean and your page ? So i can compare the date...
– Rosa Fago
Jan 4 at 17:20
I updated my answer above to include the Calendar snippet I used. If you want to create a small reproducible test case just clone this tiny project: github.com/primefaces/primefaces-test and you can run it withmvn clean jetty:run-exploded
. If you can reproduce it with that small sample I suggest submitting a bug on the GitHub issues page.
– Melloware
Jan 4 at 18:11
@RosaFago: you shoyld post Minimal, Complete, and Verifiable example with which we can compare...
– Kukeltje
Jan 4 at 19:02
I've update the description. In your example there is no mindate property, can you pls add and make a try ? Thx so much
– Rosa Fago
Jan 7 at 9:00
|
show 1 more comment
Issue has been reproduced and a bug has been submitted on PF GitHub page:
https://github.com/primefaces/primefaces/issues/4366
Update 01/10/2019: The bug has been fixed and will be in PF 6.3
Using 6.2 Community Edition.
– Melloware
Jan 3 at 20:44
can you show me your bean and your page ? So i can compare the date...
– Rosa Fago
Jan 4 at 17:20
I updated my answer above to include the Calendar snippet I used. If you want to create a small reproducible test case just clone this tiny project: github.com/primefaces/primefaces-test and you can run it withmvn clean jetty:run-exploded
. If you can reproduce it with that small sample I suggest submitting a bug on the GitHub issues page.
– Melloware
Jan 4 at 18:11
@RosaFago: you shoyld post Minimal, Complete, and Verifiable example with which we can compare...
– Kukeltje
Jan 4 at 19:02
I've update the description. In your example there is no mindate property, can you pls add and make a try ? Thx so much
– Rosa Fago
Jan 7 at 9:00
|
show 1 more comment
Issue has been reproduced and a bug has been submitted on PF GitHub page:
https://github.com/primefaces/primefaces/issues/4366
Update 01/10/2019: The bug has been fixed and will be in PF 6.3
Issue has been reproduced and a bug has been submitted on PF GitHub page:
https://github.com/primefaces/primefaces/issues/4366
Update 01/10/2019: The bug has been fixed and will be in PF 6.3
edited Jan 10 at 12:10
answered Jan 3 at 19:36
MellowareMelloware
3,45012137
3,45012137
Using 6.2 Community Edition.
– Melloware
Jan 3 at 20:44
can you show me your bean and your page ? So i can compare the date...
– Rosa Fago
Jan 4 at 17:20
I updated my answer above to include the Calendar snippet I used. If you want to create a small reproducible test case just clone this tiny project: github.com/primefaces/primefaces-test and you can run it withmvn clean jetty:run-exploded
. If you can reproduce it with that small sample I suggest submitting a bug on the GitHub issues page.
– Melloware
Jan 4 at 18:11
@RosaFago: you shoyld post Minimal, Complete, and Verifiable example with which we can compare...
– Kukeltje
Jan 4 at 19:02
I've update the description. In your example there is no mindate property, can you pls add and make a try ? Thx so much
– Rosa Fago
Jan 7 at 9:00
|
show 1 more comment
Using 6.2 Community Edition.
– Melloware
Jan 3 at 20:44
can you show me your bean and your page ? So i can compare the date...
– Rosa Fago
Jan 4 at 17:20
I updated my answer above to include the Calendar snippet I used. If you want to create a small reproducible test case just clone this tiny project: github.com/primefaces/primefaces-test and you can run it withmvn clean jetty:run-exploded
. If you can reproduce it with that small sample I suggest submitting a bug on the GitHub issues page.
– Melloware
Jan 4 at 18:11
@RosaFago: you shoyld post Minimal, Complete, and Verifiable example with which we can compare...
– Kukeltje
Jan 4 at 19:02
I've update the description. In your example there is no mindate property, can you pls add and make a try ? Thx so much
– Rosa Fago
Jan 7 at 9:00
Using 6.2 Community Edition.
– Melloware
Jan 3 at 20:44
Using 6.2 Community Edition.
– Melloware
Jan 3 at 20:44
can you show me your bean and your page ? So i can compare the date...
– Rosa Fago
Jan 4 at 17:20
can you show me your bean and your page ? So i can compare the date...
– Rosa Fago
Jan 4 at 17:20
I updated my answer above to include the Calendar snippet I used. If you want to create a small reproducible test case just clone this tiny project: github.com/primefaces/primefaces-test and you can run it with
mvn clean jetty:run-exploded
. If you can reproduce it with that small sample I suggest submitting a bug on the GitHub issues page.– Melloware
Jan 4 at 18:11
I updated my answer above to include the Calendar snippet I used. If you want to create a small reproducible test case just clone this tiny project: github.com/primefaces/primefaces-test and you can run it with
mvn clean jetty:run-exploded
. If you can reproduce it with that small sample I suggest submitting a bug on the GitHub issues page.– Melloware
Jan 4 at 18:11
@RosaFago: you shoyld post Minimal, Complete, and Verifiable example with which we can compare...
– Kukeltje
Jan 4 at 19:02
@RosaFago: you shoyld post Minimal, Complete, and Verifiable example with which we can compare...
– Kukeltje
Jan 4 at 19:02
I've update the description. In your example there is no mindate property, can you pls add and make a try ? Thx so much
– Rosa Fago
Jan 7 at 9:00
I've update the description. In your example there is no mindate property, can you pls add and make a try ? Thx so much
– Rosa Fago
Jan 7 at 9:00
|
show 1 more comment
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54025799%2fus-datetime-format-with-primefaces-6-2-issue%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Can you try a 6.3 snapshot btw? Iirc some things were changed in between
– Kukeltje
Jan 7 at 10:23
Where can I find 6.3 .jar ?
– Rosa Fago
Jan 7 at 11:12
Source, build a snapshot yourself
– Kukeltje
Jan 7 at 11:13
The bug reported below has been fixed and will be in PF 6.3 upcoming release.
– Melloware
Jan 10 at 12:09