Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7821209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:34:08+00:00 2026-06-02T07:34:08+00:00

I have a calendar I display with only certain dates available and the rest

  • 0

I have a calendar I display with only certain dates available and the rest disabled. I get all my dates and make up my calendar and it displays without problem

<script type="text/javascript">
    $(function() {
        $.post('/jreqlib', 
            { Action: 'GetDates',
            }, function(data) {

                var myNewDates = new Array;
                for (var x = 0; x < data['validPubDates'].length; x++) {
                    myNewDates.push(data['validPubDates'][x]);
                }
                var myValidDates = new Array;
                for (var x = 0; x<data['validPubDates'].length; x++) {
                    var theDate = data['validPubDates'][x];
                    myValidDates.push(theDate);
                }               
                $('#inlineDatepicker').datepick({
                    multiSelect: 999,
                    minDate : '-14d',
                    maxDate : '+2y',                        
                    onSelect : function (dateText, inst) {
                        //alert("Clicked');
                        //$("#FormId").click();
                        $(this).parent('form').submit();
                    },
                    onDate : getAllowed(myValidDates),
                }).datepick('setDate',myNewDates);
            }, 
        'json');            
    }); 
</script>

The issue is I want to submit the form (not via ajax) when a date is clicked. I found a bunch of posts but none of them seemed to work. If I un-comment that “alert” then I see the “clicked” message but neither the $("#FormId").click(); (yes the form has a id="FormId" in it) or $(this).parent('form').submit(); or the 2 or 3 other ways I found to do the form submit.

I’m getting there on the click, the alert will fire if un-commented, how come the form won’t submit?

(BTW – I didn’t post the getAllowed function as I didn’t think it relevant but I will if needed)

TIA

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T07:34:10+00:00Added an answer on June 2, 2026 at 7:34 am

    Try giving the form an id and then calling submit via an jquery id selector:

    <form id="myFormID">
    ...
    $('#inlineDatepicker').datepick({
        multiSelect: 999,
        minDate : '-14d',
        maxDate : '+2y',                        
        onSelect : function (dateText, inst) {
            $('#myFormID').submit(); // <-- SUBMIT LIKE THIS
        },
        onDate : getAllowed(myValidDates),
    }).datepick('setDate',myNewDates);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some code to get calendar events and display them. The display is
I have an ASP.NET 4 calendar display problem. I want to programmatically set the
I have a webpage that displays a calendar, and I want to change the
I have a calendar feed (.ics) available from my application, but it's quite large
I have calendar that is working fine. Here is the function that display the
The date time displays as 07/10/2011 01:29:20 I want to display only 07/10/2011 01:29
Right now I have a calender that only displays one month(what ever month I
I've got an odd problem with a WPF Calendar control. I have modified the
I have several datepickers on the same page and need one to only display
I have calendar in Qt. I want when user selects date, 14(Qint32) will be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.